Skip to main content
Glama
c0webster

Hardened Google Workspace MCP

by c0webster

modify_doc_text

Edit text and apply formatting in Google Docs documents through a secure, controlled environment that prevents data exfiltration.

Instructions

Modifies text in a Google Doc - can insert/replace text and/or apply formatting in a single operation.

Args: user_google_email: User's Google email address document_id: ID of the document to update start_index: Start position for operation (0-based) end_index: End position for text replacement/formatting (if not provided with text, text is inserted) text: New text to insert or replace with (optional - can format existing text without changing it) bold: Whether to make text bold (True/False/None to leave unchanged) italic: Whether to make text italic (True/False/None to leave unchanged) underline: Whether to underline text (True/False/None to leave unchanged) font_size: Font size in points font_family: Font family name (e.g., "Arial", "Times New Roman") text_color: Foreground text color (#RRGGBB) background_color: Background/highlight color (#RRGGBB)

Returns: str: Confirmation message with operation details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_google_emailYes
document_idYes
start_indexYes
end_indexNo
textNo
boldNo
italicNo
underlineNo
font_sizeNo
font_familyNo
text_colorNo
background_colorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden. It explains parameter-level behaviors such as 'None to leave unchanged,' 'text is optional - can format existing text without changing it,' and 'if not provided with text, text is inserted.' It also specifies the return value. It does not explicitly discuss permissions or irreversibility, but 'insert/replace' makes the mutation clear and the added parameter nuances are valuable.

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 opens with a concise summary sentence, followed by a clearly labeled Args list and Returns line. It is a bit lengthy but each parameter explanation earns its place, and the structure is easy to scan. The front-loaded summary helps an agent quickly understand the core purpose.

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?

Given the high parameter count and no annotations, the description covers all parameters, the return type, and the main operation. It even clarifies edge-case behavior like text insertion without end_index. Missing are usage comparisons with siblings and constraints like index bounds or auth prerequisites, but the core functionality is adequately documented.

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?

Schema coverage is 0%, and the description fully compensates by explaining all 12 parameters in the Args section. It defines the meaning of each parameter, including optionality, the role of None for formatting fields, and the conditional behavior of end_index and text. This goes well beyond the raw 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 clearly states it 'Modifies text in a Google Doc' and specifies the capability: 'insert/replace text and/or apply formatting in a single operation.' This distinguishes it from siblings like find_and_replace_doc and batch_update_doc by emphasizing combined text editing and formatting in one call.

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

Usage Guidelines3/5

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

The description implies usage context through 'single operation' but does not explicitly mention when to use this tool versus alternatives like batch_update_doc or insert_doc_elements. There are no when-not-to-use instructions or named sibling alternatives, so guidance is left to inference.

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