Repository navigation
feat(mcp): add edit and organize tools for notes and snippets - #982
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds editing and organization of notes, snippets, folders and HTTP requests to the MCP server. Edits are protected by a new opt-in preference, and writes are checked against concurrent changes.
Changes
list_structure,list_items,update_note,update_snippet,trash_item,restore_item,create_folder,update_folder,delete_folder,move_items,get_note_links.create_noteandcreate_snippetacceptfolderIdandtags.contentRevision. A write with a stale revision returnsCONFLICT.api.mcp.allowEdits("Allow MCP to modify existing items"). All tools that change existing items, includingupdate_http_request, returnEDITING_DISABLEDwhile it is off.list_http_requestsacceptsstatus: active | trash, so request IDs can be found forrestore_item.trash_itemclearsfolderId, matching the app.delete_folderremoves only empty folders: subfolders, active items or files that massCode does not manage block deletion.getUnmanagedFilesfor code and notes folders, and a fix that prevents a folder from becoming its own parent.Behavior changes and migration
api.mcp.allowEditsis enabled automatically for users who already have MCP enabled, so their current behavior is preserved. New users get it disabled by default.update_http_requestrequiresallowEdits. Until they enable it, the tool returnsEDITING_DISABLED.Testing
src/main/api/mcp, store preferences, storage folders (257 tests).Known limitations