Skip to main content
Glama

update_cells

Destructive

Update Google Spreadsheet cells in a specified range with plain values, formulas, or rich-text hyperlinks, using USER_ENTERED parsing for natural Sheets input.

Instructions

Update cells in a Google Spreadsheet.

Args: spreadsheet_id: The ID of the spreadsheet (found in the URL) sheet: The name of the sheet range: Cell range in A1 notation (e.g., 'A1:C10') data: 2D array of values to update. Each cell is normally a plain scalar (str/int/float/bool), parsed the same way as typing it into the Sheets UI (USER_ENTERED — formulas, dates, etc. are recognized). For a partial (rich-text) hyperlink or mixed-format run within a single cell, pass a list of run dicts instead, e.g. [{"text": "See "}, {"text": "docs", "hyperlink": "https://..."}] — each run's "text" is concatenated into the cell's literal string value (not USER_ENTERED-parsed) and an optional "hyperlink" links just that run.

Returns: Result of the update operation. If data contains only plain cells or only rich-text cells, this is that single API call's raw response. If it mixes both kinds, this is {"values_update": , "rich_text_update": } since the two are separate API calls and neither result should be silently dropped.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "spreadsheet_id": "<spreadsheet_id>",
      "sheet": "<sheet>",
      "range": "<range>",
      "data": "<data>"
    },
    "name": "update_cells"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYes
rangeYes
sheetYes
spreadsheet_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Goes well beyond the destructiveHint=true annotation by disclosing that plain scalars are USER_ENTERED-parsed (formulas and dates are recognized), that list-of-run-dicts triggers a rich-text path with different literal-string semantics, and that mixed input results in two separate API calls. The main omission is that it never says existing cell contents in the range are overwritten — the key destructive behavior an agent needs confirmed.

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 one-line purpose followed by Args and Returns sections, which is easy to scan. The data and Returns prose are long but each sentence adds non-obvious information about parsing and split responses rather than restating the schema.

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 an output schema exists, the return-value explanation is arguably redundant but it clarifies the mixed plain/rich-text case that a schema alone would not convey. What is missing for a tool flagged destructive is a plain statement that target cells are replaced and whether formatting is preserved.

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 description coverage is 0%, so the description must carry all parameter meaning and it does: spreadsheet_id is located 'in the URL', range is A1 notation with an example ('A1:C10'), sheet is the sheet name, and data is a 2D array with detailed scalar-vs-rich-text-run semantics and a concrete run-dict example.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Update cells in a Google Spreadsheet.' An agent can tell this is a write operation on sheet cells versus the read-oriented get_sheet_data. It does not explicitly differentiate itself from batch_update, which is the closest sibling, so it falls short of a 5.

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?

Usage is implied by the argument list (you supply spreadsheet_id, sheet, range, data), so the write-to-range intent is inferable. However, there is no statement of when to prefer this over batch_update, no prerequisite/permission guidance, and no mention of what happens to existing values outside the supplied range.

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