Skip to content

Conversation

@olaservo
Copy link
Member

@olaservo olaservo commented Jan 24, 2026

Description

Adds tool-level annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) to the get-annotated-message tool in the Everything server.

This tool previously demonstrated only content annotations (priority, audience). It now showcases both:

  • Tool-level annotations: hints about the tool's behavior
  • Content annotations: metadata about returned content

Server Details

  • Server: everything
  • Changes to: tools, docs

Motivation and Context

Tool annotations are part of the MCP specification and provide hints to clients about tool behavior:

Annotation Purpose
readOnlyHint Indicates the tool does not modify its environment
destructiveHint Indicates whether the tool may perform destructive updates
idempotentHint Indicates whether repeated calls with same args have no additional effect
openWorldHint Indicates whether the tool interacts with external entities

The Everything server is a reference implementation that demonstrates all MCP features. Having a single tool that demonstrates both annotation types makes it a complete reference for:

  • Client developers testing annotation support
  • Server developers learning proper tool annotation usage
  • Integration testing of annotation handling

How Has This Been Tested?

TODO: test in inspector

  • Build passes successfully
  • Verified tool appears with annotations in tools/list response
  • Existing content annotation behavior unchanged

Breaking Changes

None. This is an additive change.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the documentation accordingly
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

olaservo and others added 2 commits January 12, 2026 07:48
Add readOnlyHint, destructiveHint, idempotentHint, and openWorldHint
annotations to the tool config. Update docs to reflect that this tool
now demonstrates both tool-level and content annotations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant