Add comment management tools (list, add, resolve)#63
Open
BayramAnnakov wants to merge 1 commit intoxing5:mainfrom
Open
Add comment management tools (list, add, resolve)#63BayramAnnakov wants to merge 1 commit intoxing5:mainfrom
BayramAnnakov wants to merge 1 commit intoxing5:mainfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
list_commentstool to retrieve all comments on a spreadsheet, including replies, authors, cell anchors, and quoted content. Supports filtering resolved comments and pagination.add_commenttool to create comments on a spreadsheet, with optional cell anchoring via A1 notation (e.g.Sheet1!A1).resolve_commenttool to resolve/close comments using the Drive API replies endpoint with theresolveaction.All three tools use the Google Drive API comments endpoint (already available via the existing
drive_serviceon the lifespan context) and include properToolAnnotations(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_commentsreturns open comments with replies and quoted cell contentlist_commentswithinclude_resolved=Trueincludes resolved commentsadd_commentcreates a file-level comment (no cell anchor)add_commentwithcell='Sheet1!A1'anchors the comment to that cellresolve_commentmarks an open comment as resolved🤖 Generated with Claude Code