Skip to main content
Glama

batchWrite

Writes values to multiple Google Sheets ranges in one API request, so you can update several ranges without separate write calls.

Instructions

Writes data to multiple ranges in a single API call. More efficient than multiple separate writeSpreadsheet calls when updating several ranges at once.

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>",
      "data": "<data>"
    },
    "name": "batchWrite"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesArray of range+values pairs to write in a single batch.
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

B3.4/5.0
Behavior2/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, and it discloses only that this is a mutation and that it batches natively. It says nothing about write-permission requirements, the readHandle capability requirement, whether the batch is atomic or partially applied on failure, or what the call returns. For a multi-range write tool with zero annotation coverage, those are material gaps.

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 sentences, front-loaded with the action and scoped by the efficiency comparison. No filler, no restatement of the tool name.

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

Completeness2/5

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

For a mutating batch tool with no annotations and no output schema, the description covers purpose and routing but not behavior: failure semantics, permission needs, and return value are all absent. The efficiency claim is the only thing beyond the schema, leaving the agent without the information needed to call it safely or interpret the result.

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 coverage is 100%, so range notation, the 2D values shape, valueInputOption semantics and the readHandle requirement are already fully documented in the schema. The description adds only the framing that multiple range/value pairs are written together. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

Names a specific verb and resource: 'Writes data to multiple ranges in a single API call.' The batching scope is explicit, which separates it from a single-range writer. It references writeSpreadsheet by name, though the differentiation relies on the sibling's assumed behavior rather than stating it outright.

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?

Gives a clear condition for use: when updating several ranges at once, this is more efficient than multiple separate writeSpreadsheet calls. That is a real when-to-use rule with a named alternative. It stops short of any exclusions (e.g., single-range writes should use the simpler tool) or prerequisites.

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