refactor(mcp): remove canvas tool and resource write endpoints#1111
Merged
Conversation
The canvas MCP tool was the only writer of the v2 resource POST/PUT endpoints - the remaining file-first write fork inside an API request. Remove the tool and the write endpoints so the resource surface is read-only: markdown notes flow through the knowledge router's DB-first accepted-write pipeline, and every other file kind arrives file-first through the storage-event indexing pipeline. - delete mcp/tools/canvas.py and its registration - drop POST/PUT from api/v2/routers/resource_router.py (GET remains) - delete now-dead schemas/v2/resource.py request/response models - rework resource router read tests to seed entities directly; add a regression test locking in the read-only surface - update docs/skills that referenced the canvas tool (.canvas file format handling is unchanged) Part of #1106 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
This was referenced Jul 20, 2026
Closed
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
From the 2026-07 architecture review (#1106). The canvas MCP tool was the only writer of the v2 resource POST/PUT endpoints — the last file-first write fork inside an API request (on cloud, a synchronous Tigris write). With canvas removed, the resource surface becomes read-only and the write invariant holds: markdown notes = DB-first accepted writes through the knowledge router; everything else = file-first through the storage-event indexing pipeline.
mcp/tools/canvas.pyand its registration inmcp/tools/__init__.pyPOST /resourceandPUT /resource/{entity_id}from the v2 resource router;GET /resource/{entity_id}remains (used byread_content/read_note)schemas/v2/resource.py(CreateResourceRequest,UpdateResourceRequest,ResourceResponse) and re-exportsResourceClientalready had no write methods — no client changes neededtest_resource_write_methods_removedlocking in the read-only surface.canvasfile format handling (file_service,bm format) is unchangedNot covered here (cross-repo): documenting the invariant in basic-memory-cloud
docs/ARCHITECTURE.md— tracked in #1106.Test plan
uv run pytest tests/mcp tests/api/v2— 1050 passeduv run pytest test-int/mcp/test_string_params_integration.py test-int/mcp/test_param_aliases_integration.py— 23 passedjust typecheck— clean (9 pre-existing uvloop deprecation warnings only)just package-check-skills— 15 skills validatedPart of #1106
🤖 Generated with Claude Code