Skip to main content
Glama

gdocs_documents_batch_update

Batch update a Google Doc by applying ordered edits like insert text, replace all, or update style. Order insertions back-to-front so indices don't shift.

Instructions

Apply a list of edits to a document. Each request sets exactly one kind of edit — insert_text, replace_all_text, update_text_style, insert_table and so on. Edits apply in order against a document that shifts as they do: when inserting at several indices, order the requests back-to-front so earlier insertions do not move the positions later ones refer to.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesThe edits to apply.
documentIdYesThe ID of the document to update.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true — a thin profile. The description adds the critical non-obvious behavior that edits apply sequentially and indices shift, which annotations do not convey. It does not mention revision/concurrency behavior (writeControl) or error semantics, so it stops short of a 5.

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?

Two sentences, front-loaded with the core action and then the ordering caveat. The long 'and so on' list of request types is slightly loose but it efficiently signals the breadth of the union without enumerating all ~30 variants.

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 batch mutation with only readOnly/openWorld annotations and no output schema, the description covers the essential sequential-index behavior an agent must know to avoid corrupting positions. It omits concurrency/revision guidance that lives in the schema's writeControl, which is acceptable though slightly incomplete.

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 coverage is 100%, so the schema already documents documentId, body, requests, and writeControl with rich nested descriptions. The description only restates the request structure and ordering. Baseline 3 is appropriate since the schema does the heavy lifting.

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?

States a specific verb (apply edits) and resource (a document), plus enumerates the edit kinds (insert_text, replace_all_text, update_text_style, insert_table). It is clearly distinguishable from siblings like gdocs_documents_create, which makes a new document rather than modifying one.

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?

Gives a concrete when-to-use ordering rule for a common case (order back-to-front when inserting at several indices). It does not explicitly name alternatives such as gdocs_documents_create or explain when not to batch, but the batch semantics are clear.

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