Skip to main content
Glama

Write values to a range

write_values
DestructiveIdempotent

Overwrite a Google Sheets range with a 2-D array of values. Choose USER_ENTERED to parse formulas, numbers, and dates, or RAW for literal text; null leaves cells unchanged.

Instructions

Overwrites one A1 range with a 2-D values matrix (rows first) and returns updatedRange/updatedRows/updatedColumns/updatedCells. The matrix is anchored at the range's top-left corner; cells beyond the matrix keep their old content, and a null entry skips (does not clear) that cell — use clear_values to empty cells. value_input_option USER_ENTERED (default) parses input like typing in the UI: "=SUM(A1:A10)" becomes a live formula, "1,234" and "2026-01-15" become number/date per the spreadsheet locale; RAW stores everything as literal values. For several ranges use batch_write_values (one quota unit instead of N).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangeYesA1-notation range, e.g. "Sheet1!A1:C10", "'My sheet'!B2:D" (quote titles with spaces) or a bare sheet title for the whole sheet.
valuesYes2-D array of cell values, outer array = rows: [["Name","Score"],["Ada",42]]. null leaves the existing cell untouched.
spreadsheet_idYesThe spreadsheet id — the long id from the URL (docs.google.com/spreadsheets/d/<spreadsheetId>/edit) or from create_spreadsheet / search_spreadsheets output.
value_input_optionNoUSER_ENTERED (default) parses formulas/numbers/dates; RAW stores literal strings.
include_values_in_responseNoReturn the written cells (as rendered) in the response.
Behavior5/5

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

Annotations already mark destructiveHint=true, and the description adds depth: explains anchoring, that cells beyond matrix are untouched, null entries skip (not clear) cells, and the parsing behavior for USER_ENTERED vs RAW. This goes beyond annotations and accurately describes side effects without contradiction.

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 three sentences with dense, useful information. It front-loads the primary action and return value, then details edge cases and alternatives. Slightly long but every clause earns its place; could be trimmed but remains efficient.

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?

Covers the return fields (updatedRange/updatedRows/updatedColumns/updatedCells), key behaviors, and sibling distinctions. It lacks error-handling details or quota specifics (beyond batch hint), but given no output schema, this is sufficient for an agent to invoke correctly.

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 coverage is 100%, but the description enriches each parameter: range anchoring, null behavior in values, and concrete examples for value_input_option ('=SUM(A1:A10)' becomes formula, '1,234' becomes number/date). This adds meaning that the schema alone does not convey.

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 'Overwrites one A1 range with a 2-D values matrix' – a specific verb and resource. It differentiates from siblings by explicitly mentioning batch_write_values for multiple ranges and clear_values for clearing cells, making its role distinct.

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?

Provides explicit usage context: when to use batch_write_values instead of this tool (multiple ranges, quota savings) and when to use clear_values (to empty cells). Also explains the implications of null entries and value_input_option behavior, guiding the agent on when each option is appropriate.

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/A1-x-Tech/mcp-google-sheets'

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