Repository navigation
v1.0.0: annotate the fetch tool (release branch) - #5113
Conversation
The fetch tool set no tool annotations, unlike every tool in the git and time servers, and AGENTS.md requires them on every tool that is added or changed. It now declares readOnlyHint: true, destructiveHint: false, idempotentHint: true and openWorldHint: true (the values proposed on #3572), so clients can apply allow-reads/gate-sends policies to it. Protocol test pins them in tools/list; README lists them. Closes #3572 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
|
There was a problem hiding this comment.
🟢 Approval recommended
The annotations match the MCP specification, requested behavior, existing server patterns, and protocol-level test coverage.
0 open findings
What changed in this PR
Adds MCP tool annotations to the SDK 1.x fetch server release branch, aligning its metadata with other reference servers and issue #3572.
Changes:
- Declares all four behavioral hints for
fetch. - Documents the annotations.
- Verifies their wire representation through the protocol test.
| File | Description |
|---|---|
src/fetch/src/mcp_server_fetch/server.py |
Adds ToolAnnotations to fetch. |
src/fetch/tests/test_protocol.py |
Tests serialized annotation values. |
src/fetch/README.md |
Documents the tool annotations. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Copilot round 1: clean (0 findings, approval recommended). Loop ends on the first clean round. Merging. |
Closes #3572
Description
The fetch server's
fetchtool set no tool annotations, unlike every tool in the git and time servers;AGENTS.md(MCP protocol) requires them on every tool that is added or changed, andfetchchanged in this milestone (#1624, #4838). It now declares the values proposed on #3572:readOnlyHinttruedestructiveHintfalseidempotentHinttrueopenWorldHinttrueClients use these to apply "allow reads, gate sends" policies;
openWorldHintmatters most, sincefetchis the outbound path in a multi-server setup.Found by Copilot on the v1.0.0 merge PR #5090. Credit to @olaservo for #3572, and to @nielskaspers (#3580), @Chelebii (#3876) and @piyushbag (#4428), whose PRs proposed the same change; those are closed with a pointer here once this merges.
Server Details
fetchtool's annotations, README (Available Tools), protocol testMotivation and Context
#3572; ships in v1.0.0 (#5080).
How Has This Been Tested?
tests/test_protocol.py::test_list_tools_wire_shapepins the four annotations intools/list. Client evidence, raw JSON-RPC over stdio against this branch's SDK 1.x server (uv run --frozen mcp-server-fetch, protocol 2025-11-25):Before: no
annotationskey on the tool.npm run local:gate: EXIT=0 (fetch pytest 122 passed, ruff, pyright, coverage).Breaking Changes
None.
Types of changes
Checklist
openWorldHintdeclared)🤖 Generated with Claude Code