Skip to main content
Glama
adampaulwalker

Google Drive CRUD MCP Server

Batch Update Google Doc

docs_batch_update

Apply a batch of edit requests to a Google Doc in a single call. Order changes from the end toward the start to handle shifting indexes, and pass a revision ID to fail fast if the document changes.

Instructions

Apply a batch of edit requests to a Google Doc (documents.batchUpdate).

Accepts any Docs API request type (insertText, deleteContentRange, updateTextStyle, insertTable, insertInlineImage, ...). Indexes shift as earlier requests in the batch insert or delete content, so order edits from the END of the document toward the start, or send one request per call. Get current indexes from docs_get first. Pass writeControl with the revision id from docs_get to fail fast if the document changed since — otherwise stale indexes edit the wrong ranges silently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestsYesThe batchUpdate `requests` array (list of request dicts).
documentIdYesTarget document id.
writeControlNoOptional {"requiredRevisionId": "..."}.
user_google_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

It discloses the critical, non-obvious behavior that 'Indexes shift... so order edits from the END' and warns that 'stale indexes edit the wrong ranges silently.' This goes well beyond the sparse annotations (readOnlyHint false, etc.) by explaining the failure mode and how to prevent it through writeControl.

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 four sentences, each adding substantive value: purpose, accepted types, ordering strategy, and concurrency control. It is front-loaded and contains no filler or redundancy.

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

Completeness5/5

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

For a tool of this complexity, the description covers all essential operational aspects: supported request types, index-shift ordering, the need to fetch current indexes, and optional writeControl for conflict detection. The output schema exists, so it need not describe return values. This is complete and actionable.

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

Parameters4/5

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

The schema covers 75% of parameters, but the description adds meaningful semantic detail. It explains that the requests array can contain any Docs API request type, that indexes shift, and that writeControl should carry the revision id from docs_get. The only undocumented param, user_google_email, is self-explanatory by name.

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 opens with 'Apply a batch of edit requests to a Google Doc (documents.batchUpdate)', using a specific verb and resource. It also lists the accepted request types (insertText, deleteContentRange, etc.), which distinguishes it from sibling tools like docs_get or docs_replace_all_text.

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 gives clear usage context: 'Get current indexes from docs_get first' and 'order edits from the END of the document toward the start, or send one request per call.' It also explains when to use writeControl. However, it does not explicitly name alternatives or state when not to use this tool, so it falls short of a full 5.

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/adampaulwalker/claude-gdrive-mcp'

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