Skip to content

feat(everything): add tool annotations to reference implementation#3664

Open
owendevereaux wants to merge 1 commit intomodelcontextprotocol:mainfrom
owendevereaux:feat/everything-tool-annotations
Open

feat(everything): add tool annotations to reference implementation#3664
owendevereaux wants to merge 1 commit intomodelcontextprotocol:mainfrom
owendevereaux:feat/everything-tool-annotations

Conversation

@owendevereaux
Copy link

Summary

Add MCP tool annotations to the everything server, which serves as a reference implementation for MCP features.

Changes

Added readOnlyHint, destructiveHint, and idempotentHint annotations to 7 tools:

Tool readOnlyHint destructiveHint idempotentHint Rationale
echo true false true Pure function, returns input
get-sum true false true Pure computation
get-env true false true Environment variable lookup
get-tiny-image true false true Returns static image
get-annotated-message true false true Message formatting
get-structured-content true false true Content generation
toggle-simulated-logging false false false Toggles server state

Motivation

The everything server demonstrates MCP protocol features and is often referenced as an example. Adding annotations:

  1. Makes the reference implementation more complete
  2. Demonstrates annotation patterns for different tool types
  3. Aligns with other MCP servers (filesystem, fetch, memory, git, time) that already include annotations

Testing

  • npm run build passes in src/everything
  • Manually verified annotation structure matches MCP spec

Related

Add MCP tool annotations (readOnlyHint, destructiveHint, idempotentHint)
to tools in the everything server, which serves as a reference
implementation for MCP features.

Updated tools:
- echo: readOnly, idempotent (pure function)
- get-sum: readOnly, idempotent (pure computation)
- get-env: readOnly, idempotent (environment lookup)
- get-tiny-image: readOnly, idempotent (static image)
- get-annotated-message: readOnly, idempotent (message formatting)
- get-structured-content: readOnly, idempotent (content generation)
- toggle-simulated-logging: not readOnly, not idempotent (state toggle)

This aligns the everything server with other MCP servers (filesystem,
fetch, memory, git, time) that already include tool annotations.
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.

2 participants