Skip to main content
Glama

Sheets Update Sheet Values

sheets_update_sheet_values
Idempotent

Write values into a single A1 range in Google Sheets, overwriting covered cells; use it when you need to replace existing cell contents rather than append rows.

Instructions

Write values into one A1 range of a Google Sheets spreadsheet, overwriting the cells it covers. To add rows below existing data use sheets_append_sheet_values, and for formatting or tab changes use sheets_batch_update_spreadsheet (extended tool tier); the spreadsheet_id comes from drive_list_files, search_workspace or sheets_create_spreadsheet. Returns status ok, spreadsheet_id, updated_range, updated_rows, updated_columns, updated_cells and updated_values (the written cells with include_values_in_response, else null).

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": {
      "range_a1": "<range_a1>",
      "spreadsheet_id": "<spreadsheet_id>",
      "values": "<values>"
    },
    "name": "sheets_update_sheet_values"
  }
}

Input Schema

NameRequiredDescriptionDefault
valuesYesRows written from the range's top-left cell, each a list of cell values, e.g. [['Name', 'Total'], ['Ana', 42]]; they must fit inside range_a1, a null skips a cell and an empty string clears it.
range_a1YesRange to write. Basic A1 notation with an optional sheet prefix: 'Sheet1!A1:C10', 'A1', 'A:C' (whole columns) or '1:5' (whole rows); quote sheet names that contain spaces ('My Sheet'!A1:B2). A bare sheet name or an open-ended range such as A2:C is rejected, and without a prefix the first sheet is used.
spreadsheet_idYesGoogle Sheets spreadsheet ID: the Drive file ID, also the long ID in the spreadsheet's URL.
value_input_optionNoHow values are interpreted: USER_ENTERED parses them as if typed into the UI (formulas, numbers, dates); RAW stores them exactly as given, so a string such as '=SUM(A1:A3)' stays text.RAW
include_values_in_responseNoAlso return the written cells, as stored after parsing, in updated_values.

Output Schema

NameRequiredDescriptionDefault
statusNoMachine-readable operation status.
updated_rowsNo
updated_cellsNo
updated_rangeNo
spreadsheet_idNo
updated_valuesNo
updated_columnsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare write/idempotent/openWorld and non-destructive, so the description needn't restate safety. It adds real value by disclosing the overwrite semantics of the target range and the response fields including the include_values_in_response toggle. Minor gap: it doesn't mention permission or quota failure modes, but nothing contradicts the annotations.

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?

Three sentences, front-loaded with purpose, then routing to alternatives, then the data dependency and return shape. Dense but zero filler; each clause carries information an agent needs.

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?

For a write tool with full schema coverage, annotations and an output schema, the description covers purpose, alternatives, id sourcing and overwrite behavior. The return-value listing partially duplicates the output schema, but nothing material is missing.

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 RAW vs USER_ENTERED, A1 notation rules and null/empty-string cell behavior are already documented in the schema. The description adds only a pointer that updated_values is populated by include_values_in_response, which is a baseline-level contribution.

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 and resource ('Write values into one A1 range of a Google Sheets spreadsheet') plus the key semantic that it overwrites covered cells. It explicitly distinguishes itself from sheets_append_sheet_values and sheets_batch_update_spreadsheet, so an agent can select 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 Guidelines5/5

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

Names the two alternative tools and the exact conditions that select them ('to add rows below existing data', 'for formatting or tab changes'), and even tells the agent where spreadsheet_id comes from. No exclusions are left to inference.

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