Repository navigation
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 MCP semantics and issue requirements, with protocol-level coverage and corresponding documentation.
0 open findings
What changed in this PR
Adds accurate MCP annotations to the fetch server’s sole tool, enabling clients to recognize its read-only, non-destructive, idempotent, open-world behavior.
Changes:
- Adds all four tool annotations.
- Verifies their wire representation through the protocol test.
- Documents the annotations for users.
| File | Description |
|---|---|
src/fetch/src/mcp_server_fetch/server.py |
Defines the fetch tool annotations. |
src/fetch/tests/test_protocol.py |
Tests annotations returned by tools/list. |
src/fetch/README.md |
Documents the annotation values. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
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 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 123 passed, ruff, pyright, coverage).Breaking Changes
None.
Types of changes
Checklist
openWorldHintdeclared)🤖 Generated with Claude Code