write_values
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_valu...
This record as markdown: /tools/a1-x-tech-mcp-google-sheets/write-values.md
What write_values does on Mcp Google Sheets
AI agents use write_values to create or update resources in Mcp Google Sheets, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Mcp Google Sheets environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
range | string | Yes | A1-notation range, e.g. "Sheet1!A1:C10", "'My sheet'!B2:D" (quote titles with spaces) or a bare sheet title for the whole sheet. |
values | array | Yes | 2-D array of cell values, outer array = rows: [["Name","Score"],["Ada",42]]. null leaves the existing cell untouched. |
spreadsheet_id | string | Yes | The spreadsheet id — the long id from the URL (docs.google.com/spreadsheets/d/<spreadsheetId>/edit) or from create_spreadsheet / search_spreadsheets output. |
value_input_option | string | — | USER_ENTERED (default) parses formulas/numbers/dates; RAW stores literal strings. |
include_values_in_response | boolean | — | Return the written cells (as rendered) in the response. |
Parameters from the server's own tool schema.
Why write_values is rated Medium
Modifies spreadsheet data reversibly; high impact if misused but not permanently destructive.
From the tool's definition Overwrites one A1 range with a 2-D values matrix; reversible modification.
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs write_values safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Mcp Google Sheets, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For write_values, this is the rule to start with:
write_values stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Mcp Google Sheets, apply this rule, and every write_values call is checked against it from then on.
Questions about write_values
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). It is categorised as a Write tool in the Mcp Google Sheets MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
write_values accepts 5 parameters: range, values, spreadsheet_id, value_input_option, include_values_in_response. Required: range, values, spreadsheet_id. The full parameter table on this page comes from the server's own tool schema.
Register the Mcp Google Sheets MCP server in PolicyLayer and add a rule for write_values: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp Google Sheets. Nothing to install.
write_values is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the write_values rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for write_values. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
write_values is provided by the Mcp Google Sheets MCP server (@a1-x-tech/mcp-google-sheets). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Mcp Google Sheets, and thousands of servers like it.
This server
Across the catalogue