Skip to content

Conversation

@triepod-ai
Copy link

Summary

Adds MCP tool annotations (readOnlyHint, destructiveHint) to all tools to help LLMs better understand tool behavior and make safer decisions about tool execution.

Changes

  • Added readOnlyHint: true to get_figma_data tool (fetches data without modifications)
  • Added destructiveHint: true to download_figma_images tool (writes files to local disk)
  • Added title annotations for human-readable display
  • Bump @modelcontextprotocol/sdk from ^1.10.2 to ^1.25.1 for annotation support

Why This Matters

Tool annotations provide semantic metadata that helps LLMs understand tool behavior:

  • readOnlyHint: Indicates a tool only reads data without side effects
  • destructiveHint: Signals the tool performs write operations (creating/modifying files)
  • LLMs can make better decisions about when to use tools and in what order
  • Enables safer tool execution by distinguishing read-only from destructive operations

Testing

  • Server builds successfully (pnpm build)
  • tools/list returns annotations in response
  • Annotation values match actual tool behavior:
    • get_figma_datareadOnlyHint: true (only fetches Figma data)
    • download_figma_imagesdestructiveHint: true (writes files to disk)

Before/After

Before (tools/list response):

{
  "name": "get_figma_data",
  "description": "Get comprehensive Figma file data..."
}

After:

{
  "name": "get_figma_data",
  "description": "Get comprehensive Figma file data...",
  "annotations": {
    "title": "Get Figma Data",
    "readOnlyHint": true
  }
}

🤖 Generated with Claude Code

Add readOnlyHint and destructiveHint annotations to all tools
to help LLMs better understand tool behavior and make safer decisions.

Changes:
- Added readOnlyHint: true to get_figma_data (read-only operation)
- Added destructiveHint: true to download_figma_images (writes files to disk)
- Added title annotations for human-readable display
- Bump @modelcontextprotocol/sdk from ^1.10.2 to ^1.25.1 for annotation support

This improves tool safety metadata for MCP clients.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
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