Repository navigation
fix(mcp): annotate tool safety hints for ChatGPT - #1330
Conversation
How to use the Graphite Merge QueueAdd the label Main to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | c955d58 | Commit Preview URL Branch Preview URL |
Jul 21 2026, 09:29 PM |
There was a problem hiding this comment.
Overview: Adds MCP tool safety annotations (hints for AI clients like ChatGPT) to distinguish read-only tools from mutating tools.
Issues found: None — this looks good to ship.
The implementation is correct:
- Read-only tools (
recall,listMemories,listProjects,whoAmI,memory-graph,fetch-graph-data) are properly marked as non-destructive and idempotent - The
memorytool is correctly marked as destructive and non-idempotent since it can save/forget data - Tests verify the annotations are applied correctly
- Redundant discovery test was removed from
list-memories.test.tssincelistMemoriesis now covered indiscovery.test.ts
Score: 10/10
Keep the revamped modular MCP (drop legacy apps/mcp/src/server.ts) while porting ChatGPT tool safety annotations from #1330. Resolve docs conflicts by accepting main's MCP overview rewrite with OAuth-only auth from this branch, and delete the removed introduction page. Co-authored-by: Dhravya Shah <dhravya@supermemory.com>


Note
Low Risk
Metadata-only changes on tool registration with no change to handler logic or API behavior.
Overview
Adds MCP tool annotations (
readOnlyHint,destructiveHint,idempotentHint,openWorldHint) so hosts like ChatGPT can tell safe read tools from mutating ones.memoryis marked destructive and not read-only/idempotent.recall,listMemories,listProjects,whoAmI,memory-graph, andfetch-graph-datashare a read-only, non-destructive profile.Discovery e2e tests now assert those hints on
listTools()and includelistMemoriesin the expected tool list; the redundant discovery check was removed fromlist-memories.test.ts.Reviewed by Cursor Bugbot for commit c955d58. Bugbot is set up for automated code reviews on this repo. Configure here.
Add MCP tool safety annotations so ChatGPT can classify
listMemories/ “List all memories” as read-only instead of conservatively blocking it.Changes
recall,listMemories,listProjects,whoAmI,memory-graph,fetch-graph-data) as non-destructive and idempotent.memorysave/forget tool as mutating and destructive because it supports forgetting data.tools/list.Rollout note
After production promotion, the affected customer may need to remove and re-add or reconnect the ChatGPT app so ChatGPT re-reads the MCP tool metadata.
The Cloudflare PR build uploaded Worker version
2051for commitc955d588, but the version has no preview route and production remains routed to version2050. Production annotation verification is therefore pending merge/promotion.Testing
~/.bun/bin/bunx @modelcontextprotocol/inspector --cli http://localhost:8788/mcp --transport http --method tools/list --header "Authorization: Bearer $SUPERMEMORY_API_KEY"listMemoriesemitted{ readOnlyHint:true, destructiveHint:false, idempotentHint:true, openWorldHint:false }.origin/main:cd apps/mcp && PATH="$HOME/.bun/bin:$PATH" ~/.bun/bin/bun run build:uiSUPERMEMORY_MCP_URL=http://localhost:8788/mcp ~/.bun/bin/bun run test:e2e e2e/discovery.test.ts -t "expected tools|marks read-only|marks memory"~/.bun/bin/bunx biome check --write apps/mcp/src/server.ts apps/mcp/e2e/discovery.test.ts apps/mcp/e2e/list-memories.test.tsgit diff --check origin/main...HEADtools/listannotations against the local branch Worker.e2e/list-memories.test.tslive ingestion timed out waiting for a new memory. Discovery metadata relevant to this fix passed independently.apps/mcptype/configuration issues involving duplicate MCP SDK types, Zod schema incompatibilities, a missingd3-force-3ddeclaration, and missing DOM libs.mcp.supermemory.aistill returned the old metadata because Cloudflare shows production on version2050, not PR version2051.An internal error occurred. Please try again. If this issue persists, please contact support.All were retried successfully; simplify feedback was applied, review found no blockers, and testing reported partial for the limitations above.Session Details
(aside)to your comment to have me ignore it.