Skip to main content
Glama

Update Doc

update_document
Destructive

Update an existing Google Doc. Supports replacing all content or appending to it. The result reports the mode that was actually applied and how many characters were written, so you can confirm a replace was a replace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoWrite mode: 'replace' clears and replaces all content, 'append' adds to the end. Defaults to 'replace' when omitted. Matched case-insensitively; any other value is rejected. The result reports the mode actually applied — check it.
contentYesText content to write
document_idYesThe document ID to update

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesLink that opens the document in Google Docs — give this to the user
modeYesThe write mode actually applied: 'replace' or 'append'. Compare this against what you asked for.
statusYes'ok' when the write landed; 'not_shared' when Google would not acknowledge the document — nothing was written, and the result text says how to recover
document_idYesThe document that was written
chars_writtenYesNumber of characters written, counted in runes rather than bytes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / status / description
      Previous value: -"Always 'ok' — a failure arrives as an error, not as a status"New value: +"'ok' when the write landed; 'not_shared' when Google would not acknowledge the document — nothing was written, and the result text says how to recover"
  2. Changed1 schema field changed
    • removedOutput schema / additionalProperties
      Removed value: -false
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description clarifies exactly what destructive means: 'replace' clears and replaces all content. It also discloses useful runtime behavior: the result reports the mode actually applied and character count, with a clear warning to confirm a replace was a replace. This adds genuine value beyond the annotations.

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 three sentences with no wasted words. The main action is front-loaded, and the result-confirmation guidance is placed where it reinforces safe use without bloating the text.

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?

Given the destructive annotation, 100% schema coverage, and the presence of an output schema, the description covers the key risk area: confirming which write mode was actually applied. Nothing essential for selecting or invoking the tool is missing.

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 description coverage is 100%, and the schema already documents mode defaults, case-insensitivity, validation, and content/document_id meanings. The description adds output-focused context rather than parameter semantics, so the baseline of 3 is appropriate.

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 identifies the tool as updating an existing Google Docched, distinguishing it from create_document and other update tools by resource type. It specifies the two supported write operations, replace and append, which gives the agent a precise sense of what the tool does.

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 phrase 'existing Google Doc' implies this is not for document creation, and the replace/append distinction offers some contextual guidance. However, there is no explicit statement of when to prefer this tool over siblings like format_document or update_spreadsheet, nor any exclusions or prerequisites.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources