Skip to main content
Glama
ZatesloFL

Google Workspace MCP Server

by ZatesloFL

create_spreadsheet_comment

Add comments to Google Spreadsheets by specifying user email, spreadsheet ID, and comment content. Simplify collaboration and feedback tracking within Google Workspace.

Instructions

Create a new comment on a Google Spreadsheet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comment_contentYes
spreadsheet_idYes
user_google_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'create_spreadsheet_comment' tool. It is dynamically defined for spreadsheets, decorated with authentication and error handling, and delegates to the implementation helper.
    @require_google_service("drive", "drive_file")
    @handle_http_errors(create_func_name, service_type="drive")
    async def create_comment(service, user_google_email: str, spreadsheet_id: str, comment_content: str) -> str:
        """Create a new comment on a Google Spreadsheet."""
        return await _create_comment_impl(service, app_name, spreadsheet_id, comment_content)
  • The core implementation that uses the Google Drive API to create a comment on the specified spreadsheet, returning a formatted success message.
    async def _create_comment_impl(service, app_name: str, file_id: str, comment_content: str) -> str:
        """Implementation for creating a comment on any Google Workspace file."""
        logger.info(f"[create_{app_name}_comment] Creating comment in {app_name} {file_id}")
    
        body = {"content": comment_content}
    
        comment = await asyncio.to_thread(
            service.comments().create(
                fileId=file_id,
                body=body,
                fields="id,content,author,createdTime,modifiedTime"
            ).execute
        )
    
        comment_id = comment.get('id', '')
        author = comment.get('author', {}).get('displayName', 'Unknown')
        created = comment.get('createdTime', '')
    
        return f"Comment created successfully!\\nComment ID: {comment_id}\\nAuthor: {author}\\nCreated: {created}\\nContent: {comment_content}"
  • Registers the dynamically created comment tools, including 'create_spreadsheet_comment', with the MCP server.
    server.tool()(read_comments)
    server.tool()(create_comment)
    server.tool()(reply_to_comment)
    server.tool()(resolve_comment)
  • Triggers the creation and registration of spreadsheet-specific comment tools by calling the factory function.
    # Create comment management tools for sheets
    _comment_tools = create_comment_tools("spreadsheet", "spreadsheet_id")
    
    # Extract and register the functions
    read_sheet_comments = _comment_tools['read_comments']
    create_sheet_comment = _comment_tools['create_comment']
    reply_to_sheet_comment = _comment_tools['reply_to_comment']
    resolve_sheet_comment = _comment_tools['resolve_comment']
  • Sets the function names dynamically, e.g., 'create_comment' to 'create_spreadsheet_comment'.
    read_comments.__name__ = read_func_name
    create_comment.__name__ = create_func_name
    reply_to_comment.__name__ = reply_func_name
    resolve_comment.__name__ = resolve_func_name
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Create' implies a write/mutation operation, the description doesn't address important behavioral aspects like required permissions, whether comments are public or private, if there are rate limits, what happens on failure, or what the tool returns. The description is minimal and lacks behavioral context needed for safe invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a basic operation and front-loads the essential information about what the tool does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that there's an output schema (which means return values are documented elsewhere) and the tool has moderate complexity (3 required parameters for a write operation), the description is incomplete. While concise, it doesn't provide enough context about behavioral aspects, parameter meanings, or usage guidelines that would help an agent use this tool correctly and safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage for all 3 parameters, the description provides no parameter information whatsoever. It doesn't explain what 'comment_content' should contain, how to obtain a valid 'spreadsheet_id', or what format 'user_google_email' requires. The description fails to compensate for the complete lack of schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and target resource ('a new comment on a Google Spreadsheet'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'create_document_comment' or 'create_presentation_comment' that perform similar operations on different Google Workspace file types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, when this tool is appropriate versus other comment-related tools (like 'reply_to_spreadsheet_comment' or 'read_spreadsheet_comments'), or any context about required permissions or access levels.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZatesloFL/google_workspace_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server