Skip to main content
Glama

sheets_update_values

Idempotent

Update cell values in a Google Sheets spreadsheet by specifying a range and a 2D array. Use fixed ranges for exact row counts or flexible ranges that auto-expand to avoid mismatch errors.

Instructions

Update values in a specified range of a Google Sheets spreadsheet. Examples:

  • Fixed range "A1:C3" - must provide exactly 3 rows

  • Flexible range "A1" - will expand to fit all provided rows

  • To update rows 42-74 (33 rows), use "A42" not "A42:E53" IMPORTANT: Empty rows in your data array still count as rows!

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangeYesThe A1 notation range to update. Use "Sheet1!A1:B10" for exact range (must match row count exactly) or "Sheet1!A1" for flexible range that auto-expands based on data. TIP: If updating multiple rows with varying content, use flexible range (e.g., "A42" instead of "A42:E53") to avoid row count mismatch errors.
valuesYesA 2D array of values to update, where each inner array represents a row
spreadsheetIdYesThe ID of the spreadsheet (found in the URL after /d/)
valueInputOptionNoHow the input data should be interpreted (default: USER_ENTERED)
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false. The description adds valuable behavioral context beyond these: row-count matching for fixed ranges, auto-expansion for flexible ranges, and the warning that empty rows in the data array still count as rows. This is significant practical information that annotations do not cover.

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?

The description is appropriately sized and front-loaded: one clear purpose sentence followed by three bullet-point examples and a critical warning. Every sentence earns its place, with no redundancy or filler. The structure makes the content easy to parse.

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?

The description covers the most critical usage nuances (fixed vs flexible ranges, row-count rules) that are not obvious from the schema or annotations. It does not mention return values, but the absence of an output schema and the mutation nature make that less essential. Overall, it gives an agent enough context to use the tool correctly in most scenarios.

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?

With 100% schema description coverage, the baseline is 3. The description enhances the parameter understanding with concrete examples for the 'range' parameter, such as avoiding 'A42:E53' and using 'A42' to prevent row-count mismatch errors. This goes beyond the schema's formal definition and gives the agent actionable guidance.

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 clearly states the tool's function: 'Update values in a specified range of a Google Sheets spreadsheet.' The examples further clarify the exact behavior (fixed vs flexible ranges) and distinguish it from append/clear/read tools by focusing on overwriting existing cells.

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?

The description provides detailed usage examples and tips (e.g., using 'A42' for rows 42-74) but does not explicitly contrast with sibling tools like sheets_batch_update_values or sheets_append_values. When to choose this tool is implied rather than directly stated, leaving the agent to infer the differentiation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/freema/mcp-gsheets'

If you have feedback or need assistance with the MCP directory API, please join our Discord server