Skip to main content
Glama
hermoso-ai

Hermoso

Official

Edit a Google Doc in place

update_doc
DestructiveIdempotent

Edit a Google Doc by replacing specific text with find/replace pairs or rewriting the entire body. Reports zero matches as failure so silent no-op edits never happen.

Instructions

EDIT a Google Doc — the correction append_to_doc cannot make, which until now meant a doc could only ever grow and a wrong line stayed in it forever. Two shapes: replacements:[{find, replace}] rewrites specific text wherever it appears (call read_doc first and match the text EXACTLY; matchCase:false ignores case), or rewrite:"…" replaces the ENTIRE body (rewrite:"" empties it). Find/replace runs immediately and REPORTS how many occurrences changed — zero matches is reported as a FAILURE to match, never as a quiet success, because a text edit that silently does nothing is worse than one that visibly fails. A whole-body rewrite is destructive: call it without confirm first to get the character count, then confirm:true + confirmCells. Both are index-free by design — an agent cannot reliably compute Google’s character offsets, and a wrong offset deletes the wrong sentence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docUrlNoa Google Docs URL — the id is extracted from it
confirmNo
rewriteNoreplace the WHOLE body with this text ("" empties the doc)
documentIdNothe document id (from create_doc, or list_drive_files for one the user picked)
confirmCellsNoecho back the character count the unconfirmed call reported (rewrite only)
replacementsNofind/replace pairs, applied in order

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.161

TDQS

A5/5.0
Behavior5/5

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

Even though destructiveHint and readOnlyHint are already in annotations, the description adds critical behavioral detail: zero matches are reported as a failure, whole-body rewrite requires a confirm/confirmCells dance, and the tool is deliberately index-free to avoid deleting the wrong sentence. These disclosures go beyond annotations and do not contradict them.

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 text is long but information-dense; every sentence carries a distinct operational fact such as failure reporting, confirmation workflow, or index-free rationale. The two operation shapes are front-loaded, and the paragraph remains scannable despite its length.

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 destructive, two-mode editing tool with no output schema, the description covers prerequisites, the confirmation workflow, failure reporting, and the offset-avoidance constraint. There is no critical missing context an agent would need to invoke it correctly.

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?

With 83% schema description coverage, the schema already documents most parameters, and the description adds operational meaning: matchCase:false ignores case, replacements are find/replace pairs applied in order, confirmCells echoes the unconfirmed character count, and rewrite:"" empties the doc. This reframes raw schema fields into practical invocation semantics.

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 names the specific operation 'EDIT a Google Doc', immediately distinguishes it from append_to_doc's grow-only limitation, and enumerates the two actual behaviors: replacements and whole-body rewrite. This makes purpose and scope unambiguous and clearly separates it from sibling tools.

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

Usage Guidelines5/5

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

It explicitly states when to use the tool (to make corrections append_to_doc cannot), instructs calling read_doc first and matching text EXACTLY, and prescribes a two-step confirm flow for rewrites. It also warns against using character offsets, giving concrete guidance on what not to do.

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