Repository navigation
fix(mcp): annotate destructive and read-only tools - #17
Conversation
There was a problem hiding this comment.
The annotations are correct. The 13 read tools are the GET-only ones, and the 3 delete tools are the DELETE ones. The writes.test.ts mock change keeps resolving the handler as the last argument.
Nit: in the MCP spec, destructiveHint defaults to true whenever readOnlyHint is not true. So the unannotated create_* and plan_next_cycle tools still look destructive to clients, and { destructiveHint: true } on the deletes only states the default. The additive tools would benefit from { destructiveHint: false }, but annotations.test.ts ("marks no other tool destructive or read-only") currently forbids that. Consider loosening that assertion so a follow-up can do it.
Nit: the + 11 in "covers every registered tool" is a magic number. A named OTHER list of the write tools would make the test fail with a readable diff when a tool is added.
Registers get/list/search tools with
readOnlyHint: trueand the three delete tools withdestructiveHint: true, so clients can gate them as the README describes. Adds a test covering every tool's annotations.Closes #13