Skip to main content
Glama
Hermoso

Hermoso

Official

Write to a range in a Google Sheet

update_sheet
DestructiveIdempotent

Correct specific cells in a Google Sheet by writing values to an exact range, overwriting existing data only after confirmation.

Instructions

CORRECT cells in a Google Sheet — write values to an exact range, overwriting whatever is there. This is the fix append_to_sheet cannot make: appending only ever adds rows at the bottom, so without this a wrong number stays wrong forever and the only "correction" is a second row contradicting the first. Pass range (e.g. "B2:C5", or "Q3 Report!B2" to name a tab — list_sheet_tabs gives the names) and values as an array of row arrays; an anchor cell like "B2" is fine and the block is written down and right from it. Writing into EMPTY cells goes straight through. Writing OVER cells that already hold values is REFUSED first, naming exactly how many filled cells would be overwritten — show the user that, get a yes, then call again with confirm:true. The result is READ BACK from the sheet, so what you report is what the sheet now holds rather than what Google accepted.

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_sheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
rangeNoA1 range or anchor cell, e.g. "B2:C5", "B2", or "Q3 Report!B2" (default A1)
valuesNoarray of row arrays to write
confirmNorequired only when the target range already holds values
updatesNowrite SEVERAL disjoint ranges in one call, instead of range+values
sheetUrlNoGoogle Sheets link, instead of spreadsheetId
spreadsheetIdNoGoogle spreadsheet id; use this or sheetUrl
valueInputOptionNoUSER_ENTERED (default) parses formulas, dates and numbers the way typing them would; RAW stores every value as literal text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.465
    • addedInput schema / properties / sheetUrl / description
      Added value: +"Google Sheets link, instead of spreadsheetId"
    • addedInput schema / properties / spreadsheetId / description
      Added value: +"Google spreadsheet id; use this or sheetUrl"
    • addedInput schema / properties / updates / items / properties / range / description
      Added value: +"A1 range or anchor cell for this block, e.g. B2:C5 or Q3!B2"
    • addedInput schema / properties / updates / items / properties / values / description
      Added value: +"rows for this block, as an array of row arrays"
  2. Changed4 schema fields changedv0.1.454
    • removedInput schema / properties / updates / items / properties / values / items / items / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  }
      -]
    • addedInput schema / properties / updates / items / properties / values / items / items / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean"
      +]
    • removedInput schema / properties / values / items / items / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  }
      -]
    • addedInput schema / properties / values / items / items / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean"
      +]
  3. Addedv0.1.161

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark the tool destructive, idempotent, and open-world, but the description adds critical behavior beyond them: overwrites are refused before confirmation, the user must approve the exact count of filled cells, and the result is read back from the sheet rather than trusting Google's response.

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 is front-loaded with the core action and safety model, and its length is mostly justified by the confirm/overwrite behavior. Some motivational phrasing about wrong numbers staying wrong forever is explanatory rather than essential, so it is slightly over-written but not bloated.

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 write tool with no output schema, the description covers the essential safety flow, range syntax, overwrite refusal, confirmation requirement, and read-back result. The remaining optional parameters are fully documented in the schema, so nothing critical is missing.

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 useful semantics for range A1 notation, anchor-cell expansion down and right, row-array values, and the confirm flow. It does not explain updates, sheetUrl, spreadsheetId, or valueInputOption beyond what the schema already provides.

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 states a specific verb and resource: correcting/writing values to an exact range in a Google Sheet. It explicitly distinguishes the tool from append_to_sheet by explaining that appending cannot overwrite existing rows.

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 gives clear when-to-use guidance versus append_to_sheet and explains the decision path: writes to empty cells pass through, while overwrites are refused and require showing the user the affected cells before retrying with confirm:true. This is explicit operational guidance, not implied usage.

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