Skip to main content
Glama

writeSpreadsheet

Writes a 2D array of values to a specified spreadsheet range, overwriting existing cells. Use it to replace data; append rows separately to add without overwriting.

Instructions

Writes data to a range in a spreadsheet, overwriting existing values. Use appendRows to add data without overwriting.

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": {
      "spreadsheetId": "<spreadsheetId>",
      "range": "<range>",
      "values": "<values>"
    },
    "name": "writeSpreadsheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
rangeYesA1 notation range to write to (e.g., "A1:B2" or "Sheet1!A1:B2").
valuesYes2D array of values to write. Each inner array represents a row.
readHandleNoCapability returned by the corresponding read tool. Required on the modern MCP runtime, including modern stdio.
spreadsheetIdYesThe spreadsheet ID — the long string between /d/ and /edit in a Google Sheets URL.
valueInputOptionNoHow input data should be interpreted. RAW: values are stored as-is. USER_ENTERED: values are parsed as if typed by a user.USER_ENTERED

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0-rc.1

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose the destructive overwrite behavior, which is the most important trait. However, it says nothing about permissions, the readHandle capability requirement, or what a successful write returns, which leaves meaningful gaps for a mutation tool.

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?

Two short sentences with zero waste. The mutation behavior is front-loaded, and the alternative follows immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter write with no annotations and no output schema, the description covers the core risk but omits permissions, the required readHandle, and result shape. It is adequate to select the tool but not complete enough to invoke it confidently without reading the schema.

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%, so every parameter is already documented, including range format, the 2D values shape, and the RAW vs USER_ENTERED enum. The description adds no parameter meaning beyond the schema, which is the expected baseline here.

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?

States a specific verb (writes), resource (a range in a spreadsheet), and effect (overwriting existing values). It also names the sibling it is not (appendRows), so an agent can distinguish it without opening a schema.

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

Usage Guidelines4/5

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

Explicitly routes the agent to appendRows when preserving existing data matters, which is the key decision point. It does not cover other nearby alternatives such as batchWrite or clearRange, but the main when-to-use split is clear.

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