-
Notifications
You must be signed in to change notification settings - Fork 330
feat: Add MCP tool annotations (47 tools) #329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Add MCP tool annotations (47 tools) #329
Conversation
Add ToolAnnotations to 47 tools across Gmail, Docs, and Drive modules: - gmail_tools.py: 15 tools (8 readOnly, 7 destructive) - docs_tools.py: 14 tools (5 readOnly, 9 destructive) - drive_tools.py: 14 tools (7 readOnly, 7 destructive) - Partial coverage for remaining modules Annotations include: - `title`: Human-readable tool names - `readOnlyHint`: For query/fetch operations - `destructiveHint`: For create/update/delete operations This enables LLMs to make safer, more informed decisions about tool usage - read-only tools can be auto-approved while destructive tools trigger confirmation prompts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Changed to destructiveHint=False (additive/modify operations): - gdocs: Create Doc, Modify Doc Text, Insert Doc Elements, etc. (9 tools) - gdrive: Create/Update/Share Drive File, etc. (6 tools) - gmail: Send/Draft Gmail, Create Filter, Modify Labels (5 tools) - gsheets: Create Sheet - gslides: Create Presentation Kept destructiveHint=True (actually destructive): - gdrive: Remove Drive Permission - gmail: Manage Gmail Label (can delete), Delete Gmail Filter Per MCP spec: destructiveHint should only be true for operations that DELETE or DESTROY data, not for create/update/share operations. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Fix: Corrected destructiveHint SemanticsUpdated annotations to properly distinguish between additive and destructive operations per the MCP spec. Changed to
|
|
There is a comment about how doc mutation functions shouldn’t be marked as descriptive which is an interesting one but your PR description seems to conflict with your own assertion there - Which matches up with how I view it. Appreciate the PR I will give it a full review and make sure we get the other tools up to snuff as well! |
|
You're right - I checked the official MCP filesystem server for guidance:
So the distinction is "creates new things vs modifies existing content." I'll push a fix that:
Thanks for pushing back - it led to a better understanding of the spec! |
Per official MCP filesystem server pattern: - write_file, edit_file have destructiveHint=true - create_directory has destructiveHint=false Updated 11 modify/update tools to destructiveHint=true: - Docs: modify_doc_text, find_and_replace, insert_*, update_headers, batch_update - Drive: update_file, update_permission, transfer_ownership - Gmail: modify_labels, batch_modify_labels Pure create operations remain destructiveHint=false: - create_doc, send_email, create_filter, share_file, etc.
Summary
Add
ToolAnnotationsto 47 MCP tools across Gmail, Google Docs, and Google Drive modules.Changes by Module
Annotation Types
title: Human-readable names for better LLM understandingreadOnlyHint=True: Query/fetch operations (search, get, list)destructiveHint=False: Create operations (create_doc, send_email, share_file)destructiveHint=True: Modify/update/delete operationsdestructiveHint Semantics
Following the official MCP filesystem server pattern:
destructiveHint=true(modifies existing content)destructiveHint=false(purely additive)Additive operations (
destructiveHint=False):Modify operations (
destructiveHint=True):Delete operations (
destructiveHint=True):Why This Matters
Tool annotations help MCP clients make safer, more informed decisions:
Test Plan
🤖 Generated with Claude Code