Skip to main content
Glama
ZatesloFL

Google Workspace MCP Server

by ZatesloFL

batch_update_presentation

Apply multiple updates to a Google Slides presentation in a single batch operation. Specify the user email, presentation ID, and list of update requests to modify slides efficiently.

Instructions

Apply batch updates to a Google Slides presentation.

Args: user_google_email (str): The user's Google email address. Required. presentation_id (str): The ID of the presentation to update. requests (List[Dict[str, Any]]): List of update requests to apply.

Returns: str: Details about the batch update operation results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
presentation_idYes
requestsYes
user_google_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler function for the 'batch_update_presentation' tool. It registers the tool via @server.tool(), handles authentication and errors, and executes batch updates on a Google Slides presentation using the API's batchUpdate method. Processes requests, executes the API call off-thread, parses replies, and returns a formatted confirmation message with results.
    @server.tool()
    @handle_http_errors("batch_update_presentation", service_type="slides")
    @require_google_service("slides", "slides")
    async def batch_update_presentation(
        service,
        user_google_email: str,
        presentation_id: str,
        requests: List[Dict[str, Any]]
    ) -> str:
        """
        Apply batch updates to a Google Slides presentation.
    
        Args:
            user_google_email (str): The user's Google email address. Required.
            presentation_id (str): The ID of the presentation to update.
            requests (List[Dict[str, Any]]): List of update requests to apply.
    
        Returns:
            str: Details about the batch update operation results.
        """
        logger.info(f"[batch_update_presentation] Invoked. Email: '{user_google_email}', ID: '{presentation_id}', Requests: {len(requests)}")
    
        body = {
            'requests': requests
        }
    
        result = await asyncio.to_thread(
            service.presentations().batchUpdate(
                presentationId=presentation_id,
                body=body
            ).execute
        )
    
        replies = result.get('replies', [])
    
        confirmation_message = f"""Batch Update Completed for {user_google_email}:
    - Presentation ID: {presentation_id}
    - URL: https://docs.google.com/presentation/d/{presentation_id}/edit
    - Requests Applied: {len(requests)}
    - Replies Received: {len(replies)}"""
    
        if replies:
            confirmation_message += "\n\nUpdate Results:"
            for i, reply in enumerate(replies, 1):
                if 'createSlide' in reply:
                    slide_id = reply['createSlide'].get('objectId', 'Unknown')
                    confirmation_message += f"\n  Request {i}: Created slide with ID {slide_id}"
                elif 'createShape' in reply:
                    shape_id = reply['createShape'].get('objectId', 'Unknown')
                    confirmation_message += f"\n  Request {i}: Created shape with ID {shape_id}"
                else:
                    confirmation_message += f"\n  Request {i}: Operation completed"
    
        logger.info(f"Batch update completed successfully for {user_google_email}")
        return confirmation_message
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'batch updates' implying mutation, but doesn't disclose critical behaviors: whether updates are atomic, if there are rate limits, what happens on partial failures, or authentication requirements beyond the email parameter. For a mutation tool with zero annotation coverage, this is a significant gap in behavioral context.

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

Conciseness4/5

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

The description is well-structured with clear sections (purpose, Args, Returns) and avoids redundancy. The first sentence directly states the tool's function, and subsequent sections are organized. It could be slightly more concise by integrating the Args explanation into the main text, but overall it's efficient.

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 the tool's complexity (batch mutation with 3 parameters), no annotations, and 0% schema coverage, the description is moderately complete. It covers basic purpose and parameters but lacks behavioral details and usage context. The output schema exists (implied by Returns), so describing return values isn't needed, but other gaps remain for a mutation tool.

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

Parameters3/5

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

Schema description coverage is 0%, so the schema provides no parameter documentation. The description lists parameters in the Args section with basic types, adding minimal semantics (e.g., 'user_google_email' as 'The user's Google email address'). However, it doesn't explain the structure of 'requests' or provide examples, leaving key details unclear. This partially compensates but doesn't fully address the coverage gap.

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 verb ('Apply batch updates') and resource ('to a Google Slides presentation'), making the purpose unambiguous. It distinguishes from siblings like 'create_presentation' or 'get_presentation' by focusing on batch updates, though it doesn't explicitly differentiate from similar tools like 'batch_update_doc' beyond the resource type.

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. It doesn't mention prerequisites (e.g., needing edit permissions), compare to single-update methods, or specify use cases like bulk formatting changes. With many sibling tools, this lack of context leaves the agent guessing about appropriate scenarios.

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