Skip to main content
Glama
EveryInc

google-workspace-mcp-server

by EveryInc

Batch Update Google Document

docs_batch_update
Destructive

Apply batch updates to a Google Doc to insert, update, or delete text, formatting, images, and tables using the Google Docs API.

Instructions

Apply batch updates to a Google Doc (insert/update/delete text, formatting, images, tables).

Args:

  • document_id (string): The ID of the Google Doc to update

  • requests (array): Array of batch update request objects

Common request types:

  • insertText: { insertText: { location: { index: 1 }, text: "Hello" } }

  • deleteContentRange: { deleteContentRange: { range: { startIndex: 1, endIndex: 10 } } }

  • updateTextStyle: { updateTextStyle: { range: {...}, textStyle: {...}, fields: "bold" } }

  • insertInlineImage: { insertInlineImage: { location: {...}, uri: "https://..." } }

  • insertTable: { insertTable: { rows: 3, columns: 3, location: {...} } }

See Google Docs API batchUpdate documentation for full request schema.

Returns: { "documentId": string, "replies": array, "writeControl": object }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYesThe ID of the Google Doc to update
requestsYesArray of batch update request objects (see Google Docs API batchUpdate documentation)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.3

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already indicate destructiveHint=true and readOnlyHint=false. The description adds concrete behavioral detail by showing example request types, including deleteContentRange, insertText, and insertTable, and by exposing the return object with writeControl. This goes beyond the generic annotation to clarify what kinds of mutations are possible and what response to expect.

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 well-structured: a one-line purpose, then clear parameter definitions, followed by c compact examples of request types, and finally the return format. Every section adds value, and the examples are formatted concisely. There is no redundant filler.

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

Completeness4/5

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

For a complex tool without an output schema, the description covers the essentials: input parameters, request type examples, and the return structure. It omits details like request ordering, error handling, and the full API schema, but it provides a solid baseline and directs users to official documentation. Given the complexity, this is reasonably complete.

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

Parameters5/5

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

The schema provides only generic descriptions for document_id and requests. The description significantly enriches the 'requests' parameter by supplying five concrete JSON examples for common operations (insertText, deleteContentRange, updateTextStyle, insertInlineImage, insertTable) and a pointer to the full API schema. This transforms a vague array parameter into actionable guidance.

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

Purpose5/5

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

The description starts with a specific, actionable verb phrase 'Apply batch updates to a Google Doc' and lists the exact types of modifications (insert/update/delete text, formatting, images, tables). This clearly distinguishes it from sibling tools like docs_get_document (read-only) and docs_create_document (creation).

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

Usage Guidelines4/5

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

The description implicitly defines its use case as modifying an existing Google Doc via batch operations. It does not explicitly mention alternatives or when not to use it, but the list of common request types and the resource mention make the intended usage clear. Sibling tool names reinforce the distinction.

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