Skip to content

feat(fetch): add tool annotations for fetch tool - #4428

Closed
piyushbag wants to merge 1 commit into
modelcontextprotocol:mainfrom
piyushbag:feat/fetch-tool-annotations-3572
Closed

piyushbag wants to merge 1 commit into
modelcontextprotocol:mainfrom
piyushbag:feat/fetch-tool-annotations-3572

Conversation

@piyushbag

Copy link
Copy Markdown

Summary

  • Add ToolAnnotations to the fetch server's single fetch tool: readOnlyHint=true, idempotentHint=true, destructiveHint=false, openWorldHint=true.
  • Document the annotation table in src/fetch/README.md, consistent with the filesystem server README.

Fixes #3572

Motivation

The fetch reference server was the remaining unannotated server called out in #3572. Accurate annotations (especially openWorldHint: true) help MCP clients gate outbound network access in multi-tool setups.

Approach

Follows the same ToolAnnotations pattern already used in src/git and src/time. Metadata-only change; no runtime behavior change.

Test plan

  • cd src/fetch && uv run pytest -q (20 passed)
  • cd src/fetch && uv run ruff check src tests

Set readOnlyHint, idempotentHint, destructiveHint, and openWorldHint on
the fetch tool registration, matching the spec in modelcontextprotocol#3572 and the pattern
used by git and time reference servers. Document the annotations in the
fetch README.

Fixes modelcontextprotocol#3572
@cliffhall

Copy link
Copy Markdown
Member

Thank you for this pull request. This repository now accepts issues, not pull requests, from anyone but its maintainers: design and implementation are done by the maintainers through a prompt-driven workflow, so outside PRs are closed rather than reviewed. The policy is in CONTRIBUTING.md.

This change is tracked in #3572, which links back to this PR and credits you. It is being made in #5112 (v2/main) and #5113 (the v1.0.0 release branch), with the same annotations proposed on #3572: readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true.

@cliffhall cliffhall closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tool annotations to server-fetch (1 tool, 0 annotated)

2 participants