Skip to main content
Glama
Hermoso

Hermoso

Official

Edit a Google Doc in place

update_doc
DestructiveIdempotent

Edit Google Docs with exact text replacements, whole-body rewrites, or dropdown updates. Reports match counts and requires confirmation before destructive rewrites.

Instructions

EDIT a Google Doc — the correction append_to_doc cannot make. 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), or dropdowns:[{title, value}] sets a dropdown chip (e.g. Status -> Approved — read_doc lists every chip with its options; pass dropdownId when two share a title; an unknown title or option is refused with the real list and nothing changes); the same entry with options:[…] (the COMPLETE new list, 2–50) and/or newTitle changes the dropdown itself for every chip built from it, and an option you drop that a chip shows needs replace:{"Old":"New"}. 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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "update_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
docUrlNoa Google Docs URL — the id is extracted from it
confirmNotrue runs a whole-body rewrite after the character count is shown
rewriteNoreplace the WHOLE body with this text ("" empties the doc)
dropdownsNodropdown chips to set, or dropdowns to change
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. Changed5 schema fields changedv0.1.465
    • addedInput schema / properties / confirm / description
      Added value: +"true runs a whole-body rewrite after the character count is shown"
    • addedInput schema / properties / dropdowns / items / properties / tabId / description
      Added value: +"tab id holding the dropdown, when the document has several tabs"
    • addedInput schema / properties / replacements / items / properties / find / description
      Added value: +"exact text to find, as read_doc shows it; zero matches is reported as a failure"
    • addedInput schema / properties / replacements / items / properties / matchCase / description
      Added value: +"false ignores letter case when matching; default matches case"
    • addedInput schema / properties / replacements / items / properties / replace / description
      Added value: +"text to put in place of each match"
  2. Changed5 schema fields changedv0.1.398
    • changedInput schema / properties / dropdowns / description
      Previous value: -"dropdown chips to set"New value: +"dropdown chips to set, or dropdowns to change"
    • addedInput schema / properties / dropdowns / items / properties / newTitle
      Added value: +{
      +  "description": "rename the dropdown",
      +  "type": "string"
      +}
    • addedInput schema / properties / dropdowns / items / properties / options
      Added value: +{
      +  "description": "change the dropdown itself: the COMPLETE new option list (2–50) by display text; existing options keep their colour; shared by every chip built from it",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / dropdowns / items / properties / replace
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "for an option you remove that a chip shows: {\"Old\": \"New\"}",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • removedInput schema / properties / dropdowns / items / required
      Removed value: -[
      -  "value"
      -]
  3. Changed1 schema field changedv0.1.372
    • addedInput schema / properties / dropdowns
      Added value: +{
      +  "description": "dropdown chips to set",
      +  "items": {
      +    "properties": {
      +      "dropdownId": {
      +        "description": "when two dropdowns share a title",
      +        "type": "string"
      +      },
      +      "tabId": {
      +        "type": "string"
      +      },
      +      "title": {
      +        "description": "the dropdown title (from read_doc)",
      +        "type": "string"
      +      },
      +      "value": {
      +        "description": "the option to select, by its display text",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  4. Addedv0.1.161

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: find/replace reports occurrence counts and treats zero matches as a visible FAILURE, dropdown errors are refused atomically with the real option list, and the confirm/confirmCells round-trip exists to surface character counts before a destructive rewrite. This is exactly the behavioral context annotations alone cannot convey.

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?

Front-loaded with the verb and the three shapes; every sentence carries operational information. It is a single dense block with semicolon chains, which slightly hurts scanability for a seven-parameter tool, but there is no filler.

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 complex, no-output-schema tool, it covers the confirm flow, failure reporting, and dropdown edge cases. It does not state what is returned on a successful dropdown mutation or describe partial-success behavior across multiple replacements, which are the remaining gaps.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: the options/newTitle entry changes the dropdown definition itself for every chip built from it, a dropped option needs replace:{Old:New}, and matchCase:false relaxes matching. It reinforces rather than duplicates the schema, though some of the same detail is already in the property descriptions.

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?

Opens with a specific verb+resource ('EDIT a Google Doc') and immediately differentiates from the sibling append_to_doc ('the correction append_to_doc cannot make'). The three operation shapes are enumerated so an agent knows exactly what the tool does before opening the schema.

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?

Explicit routing: call read_doc first to match text exactly, use replacements for targeted fixes vs rewrite for the entire body, and pass the unconfirmed call before confirm:true for destructive rewrites. Alternative tools and preconditions are named rather than implied.

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