Skip to content

Conversation

@triepod-ai
Copy link

Summary

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

Changes

  • Added readOnlyHint: true to read-only tools (7 tools):
    • get_sheet_data, get_sheet_formulas, list_sheets
    • get_multiple_sheet_data, get_multiple_spreadsheet_summary
    • list_spreadsheets, list_folders
  • Added destructiveHint: true to tools that create/update/delete data (10 tools):
    • update_cells, batch_update_cells, add_rows, add_columns
    • copy_sheet, rename_sheet, create_spreadsheet, create_sheet
    • share_spreadsheet, batch_update
  • Added title annotations for human-readable display
  • Bump MCP SDK dependency from >=1.5.0 to >=1.8.0 for annotation support

Why This Matters

  • Annotations provide semantic metadata that helps MCP clients understand tool behavior
  • Clients like Claude Code can auto-approve tools with readOnlyHint: true without user confirmation
  • Destructive tools can trigger confirmation prompts for safer execution
  • Enables better UX with visual indicators based on tool characteristics

Testing

  • Server builds successfully (uv sync)
  • Import verification passes
  • Live verification: Started server and confirmed tools/list returns all annotations
  • All 7 read-only tools correctly annotated with readOnlyHint: true
  • All 10 write tools correctly annotated with destructiveHint: true

Before/After

Before:

{
  "name": "get_sheet_data",
  "description": "Get data from a specific sheet..."
}

After:

{
  "name": "get_sheet_data",
  "description": "Get data from a specific sheet...",
  "annotations": {
    "title": "Get Sheet Data",
    "readOnlyHint": true
  }
}

🤖 Generated with Claude Code

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

Changes:
- Added readOnlyHint: true to read-only tools (get_sheet_data, get_sheet_formulas,
  list_sheets, get_multiple_sheet_data, get_multiple_spreadsheet_summary,
  list_spreadsheets, list_folders)
- Added destructiveHint: true to tools that modify data (update_cells,
  batch_update_cells, add_rows, add_columns, copy_sheet, rename_sheet,
  create_spreadsheet, create_sheet, share_spreadsheet, batch_update)
- Added title annotations for human-readable display
- Bump MCP SDK from >=1.5.0 to >=1.8.0 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