Skip to main content
Glama
ZatesloFL

Google Workspace MCP Server

by ZatesloFL

create_presentation_comment

Add comments to Google Presentations by specifying user email, presentation ID, and comment content for collaborative feedback and review.

Instructions

Create a new comment on a Google Presentation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comment_contentYes
presentation_idYes
user_google_emailYes

Implementation Reference

  • Dynamically generated handler function for the 'create_presentation_comment' tool. Decorated and named within the factory, it invokes the core comment creation implementation.
    @require_google_service("drive", "drive_file")
    @handle_http_errors(create_func_name, service_type="drive")
    async def create_comment(service, user_google_email: str, presentation_id: str, comment_content: str) -> str:
        """Create a new comment on a Google Presentation."""
        return await _create_comment_impl(service, app_name, presentation_id, comment_content)
  • Core implementation logic that uses the Google Drive API to create a new comment on the specified file (presentation). Handles the API call and formats the response.
    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}"
  • Sets the __name__ of the generated functions to 'create_presentation_comment' etc., and registers them as MCP tools using server.tool().
    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
    
    # Register tools with the server using the proper names
    server.tool()(read_comments)
    server.tool()(create_comment)
    server.tool()(reply_to_comment)
    server.tool()(resolve_comment)
  • Invokes the comment tools factory specifically for presentations/slides, assigns the functions including 'create_presentation_comment', and provides slide-specific aliases.
    # Create comment management tools for slides
    _comment_tools = create_comment_tools("presentation", "presentation_id")
    read_presentation_comments = _comment_tools['read_comments']
    create_presentation_comment = _comment_tools['create_comment']
    reply_to_presentation_comment = _comment_tools['reply_to_comment']
    resolve_presentation_comment = _comment_tools['resolve_comment']
    
    # Aliases for backwards compatibility and intuitive naming
    read_slide_comments = read_presentation_comments
    create_slide_comment = create_presentation_comment
    reply_to_slide_comment = reply_to_presentation_comment
    resolve_slide_comment = resolve_presentation_comment
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