Skip to main content
Glama
tom275275

Google Workspace MCP Server

by tom275275

batch_update_doc

Batch multiple Google Docs edits—insert or delete text, format paragraphs, replace words, insert tables, manage tabs—into one atomic update.

Instructions

Executes multiple document operations in a single atomic batch update.

Args: user_google_email: User's Google email address document_id: ID of the document to update operations: List of operation dicts. Each operation MUST have a 'type' field. All operations accept an optional 'tab_id' to target a specific tab.

Supported operation types and their parameters:

insert_text - required: index (int), text (str) delete_text - required: start_index (int), end_index (int) replace_text - required: start_index (int), end_index (int), text (str) format_text - required: start_index (int), end_index (int) optional: bold, italic, underline, font_size, font_family, text_color, background_color, link_url update_paragraph_style - required: start_index (int), end_index (int) optional: heading_level (0-6, 0=normal), alignment (START/CENTER/END/JUSTIFIED), line_spacing, indent_first_line, indent_start, indent_end, space_above, space_below insert_table - required: index (int), rows (int), columns (int) insert_page_break- required: index (int) find_replace - required: find_text (str), replace_text (str) optional: match_case (bool, default false) create_bullet_list - required: start_index (int), end_index (int) optional: list_type ('UNORDERED'|'ORDERED'|'NONE', default UNORDERED), nesting_level (0-8), paragraph_start_indices (list[int]) Use list_type='NONE' to remove existing bullet/list formatting insert_doc_tab - required: title (str), index (int) optional: parent_tab_id (str) delete_doc_tab - required: tab_id (str) update_doc_tab - required: tab_id (str), title (str)

Example operations: [ {"type": "insert_text", "index": 1, "text": "Hello World"}, {"type": "format_text", "start_index": 1, "end_index": 12, "bold": true}, {"type": "update_paragraph_style", "start_index": 1, "end_index": 12, "heading_level": 1, "alignment": "CENTER"}, {"type": "find_replace", "find_text": "foo", "replace_text": "bar"}, {"type": "insert_table", "index": 20, "rows": 2, "columns": 3}, {"type": "insert_doc_tab", "title": "Appendix", "index": 1} ]

Returns: str: Confirmation message with batch operation results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationsYes
document_idYes
user_google_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.14.3

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the burden, and it delivers substantial behavioral detail: atomicity, a full catalog of operation types with required/optional fields, defaults, and a confirmation-message return. It also explains semantic details such as list_type='NONE' removing list formatting. It omits auth requirements and failure behavior, which keeps it from 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.

Conciseness5/5

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

The description is long but is a compact reference for 11 operation types; the structure with Args, supported operations, example, and Returns makes it scannable. There is no filler, and the one-sentence summary is front-loaded.

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 high-complexity tool with no annotations and a bare schema, the description is nearly complete: every operation type, parameter, default, and return string is covered, plus an example. It does not define the units of index/start_index/end_index or confirm operation ordering, which are meaningful gaps for correct invocation.

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 input schema has 0% description coverage and only bare type declarations, so the description must document everything. It specifies user_google_email, document_id, and a detailed operations contract with per-type required/optional params, defaults, and a worked example. This fully compensates for the opaque schema.

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 a specific verb/resource pair: 'Executes multiple document operations in a single atomic batch update.' It then enumerates each supported operation type, making it easy to distinguish from single-operation sibling tools like insert_doc_elements or update_paragraph_style.

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 summary clearly signals the tool's niche: batching multiple document updates into one atomic call. It does not explicitly name alternative sibling tools or state when not to use the batch form, so it stops short of full routing guidance.

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

Deploy Server

Other Tools