Skip to content

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

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

feat(fetch): add tool annotations for fetch tool#4428
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
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)

1 participant