Repository navigation
Conversation
Each tool now carries standard MCP ToolAnnotations (readOnlyHint, openWorldHint, plus destructiveHint/idempotentHint on the two writes) so an annotation-aware client can tell a read from a write without parsing the description. Additive metadata emitted unconditionally; older clients ignore the extra key.
4 tasks done
Contributor
|
Closing as delivered elsewhere — the feature shipped, this diff cannot. #539 rebuilt the wrapper on the official MCP Python SDK and deleted Thanks for working out the matrix; it is the one that shipped. Generated by Claude Code |
Author
|
Thanks for closing the loop. I checked #539 and the SDK-backed tool annotations cover the same effect matrix, with tests around the published metadata. There is nothing useful to carry forward from this old diff. |
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.
What
Publishes standard MCP
ToolAnnotationsin the stdio server'stools/list(#206). Every tool now carries effect hints alongside itsname/description/inputSchema:readOnlyHint,openWorldHint):read_room,wait_for_message,list_rooms,discover_rooms,read_note,list_notes,read_docs.say: non-read-only, non-destructive (append), non-idempotent, open-world.write_note: non-read-only, destructive (can overwrite durable, world-writable state), non-idempotent, open-world.Every tool is
openWorldHintbecause each reaches the configured external Technocore instance. TheTool/Server.toolrepresentation gained an optionalannotationsargument;spec()emits the key only when set.Why
Closes #206. Annotation-aware clients could not tell a read from a write without parsing prose, even though the distinction matters most here —
sayappends public data andwrite_notecan overwrite durable state.On the issue's open compatibility question (emit unconditionally vs. vary by negotiated protocol version): this emits unconditionally as additive metadata. Rationale —
/humansWebMCP surface already emitsannotationsunconditionally per tool, so this matches existing precedent in the same codebase.ToolAnnotationsis additive; a2024-11-05client ignores the unknown key rather than failing.Orthogonal to #203 (which tightens
inputSchema.additionalProperties); no handler or HTTP behavior changes.Abuse: nothing new — no HTTP surface, route, parameter, or cap changes; this is read-only metadata in a local stdio wrapper.
Checks
ruff check .✓ ·ruff format --check .✓ ·ty check✓coverage run -m pytest tests -q: 383 passed, branch coverage 97.47% (fail_under=96) ✓test_tools_list_publishes_effect_annotationsfails without the change (the spec has noannotationskey →KeyError).sz.py --checkunaffected (mcp/is outside the size gate).