Skip to content

Comments

Add comment management tools (list, add, resolve)#63

Open
BayramAnnakov wants to merge 1 commit intoxing5:mainfrom
BayramAnnakov:feat/comment-management
Open

Add comment management tools (list, add, resolve)#63
BayramAnnakov wants to merge 1 commit intoxing5:mainfrom
BayramAnnakov:feat/comment-management

Conversation

@BayramAnnakov
Copy link

Summary

  • Add list_comments tool to retrieve all comments on a spreadsheet, including replies, authors, cell anchors, and quoted content. Supports filtering resolved comments and pagination.
  • Add add_comment tool to create comments on a spreadsheet, with optional cell anchoring via A1 notation (e.g. Sheet1!A1).
  • Add resolve_comment tool to resolve/close comments using the Drive API replies endpoint with the resolve action.

All three tools use the Google Drive API comments endpoint (already available via the existing drive_service on the lifespan context) and include proper ToolAnnotations (readOnlyHint / destructiveHint).

Motivation

Comments are a key collaboration feature in Google Sheets, but there was no way to interact with them via MCP. This enables AI agents to read feedback, add notes, and resolve threads — useful for workflows like data review, QA checklists, and collaborative planning.

Test plan

  • list_comments returns open comments with replies and quoted cell content
  • list_comments with include_resolved=True includes resolved comments
  • add_comment creates a file-level comment (no cell anchor)
  • add_comment with cell='Sheet1!A1' anchors the comment to that cell
  • resolve_comment marks an open comment as resolved

🤖 Generated with Claude Code

Add three new tools using the Google Drive API comments endpoint:
- list_comments: List all comments with replies, authors, and cell anchors
- add_comment: Add a comment, optionally anchored to a specific cell
- resolve_comment: Resolve/close a comment via the replies resolve action

Co-Authored-By: Claude Opus 4.6 <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