Skip to main content
Glama

sheets.spreadsheets.values.clear

Clear only the values in a specified spreadsheet range while keeping formatting, validation, and other cell properties intact; requires the spreadsheet ID and range.

Instructions

Clears values from a spreadsheet. The caller must specify the spreadsheet ID and range. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON ClearValuesRequest object; pass it via params or whole via body_file Siblings over the same resource: append, batchClear, batchClearByDataFilter, batchGet, batchGetByDataFilter, batchUpdate, batchUpdateByDataFilter, get, update.

Input Schema

NameRequiredDescriptionDefault
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
rangeYes[URL path segment] The [A1 notation or R1C1 notation](https://developers.google.com/workspace/sheets/api/guides/concepts#cell) of the values to clear.
paramsNoParameter map merged into the request; typed parameters win.
dry_runNoReturn the request that would be sent, without sending it.
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON ClearValuesRequest object.
request_bodyNoRequest body of type ClearValuesRequest: pass it via `params` (merged into the built body) or whole via `body_file`.
spreadsheetIdYes[URL path segment] The ID of the spreadsheet to update.

Output Schema

NameRequiredDescriptionDefault
clearedRangeNo
spreadsheetIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / body_file / description
      Previous value: -"Read the request body from this file ('-' for stdin) instead of building one from the parameters."New value: +"Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON ClearValuesRequest object."
    • addedInput schema / properties / request_body
      Added value: +{
      +  "description": "Request body of type ClearValuesRequest: pass it via `params` (merged into the built body) or whole via `body_file`.",
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • changedInput schema / properties / range / description
      Previous value: -"The [A1 notation or R1C1 notation](https://developers.google.com/workspace/sheets/api/guides/concepts#cell) of the values to clear."New value: +"[URL path segment] The [A1 notation or R1C1 notation](https://developers.google.com/workspace/sheets/api/guides/concepts#cell) of the values to clear."
    • changedInput schema / properties / spreadsheetId / description
      Previous value: -"The ID of the spreadsheet to update."New value: +"[URL path segment] The ID of the spreadsheet to update."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "clearedRange": {
      +      "type": "string"
      +    },
      +    "spreadsheetId": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that this is an HTTP POST that mutates state, that it is refused under --readonly profiles, that only cell values are affected while other properties are retained, and how the ClearValuesRequest body is supplied. It stops short of stating permission requirements or whether the clear is recoverable.

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?

Front-loaded with the action and its key semantic guarantee (formatting preserved), then the operational notes, then sibling context. Every sentence carries information; nothing padding.

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?

Output schema exists so return-value detail is not required, and all seven parameters are schema-documented. The only meaningful gap for an agent is the lack of an explicit rule for choosing this over batchClear or batchClearByDataFilter.

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 description coverage is 100%, so the schema already documents spreadsheetId, range, params, body_file and dry_run. The description only restates the two required inputs and how to route the request body, adding no notation/format detail beyond the schema. Baseline 3 is appropriate.

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?

States a specific verb and resource ('Clears values from a spreadsheet') and immediately disambiguates scope: only values are removed while formatting and data validation are preserved. It also enumerates the sibling tools over the same resource, though it does not say how this one differs from batchClear/batchClearByDataFilter beyond naming them.

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?

Usage context is implied rather than stated: the sibling list containing batchClear and batchClearByDataFilter hints that this is the single-range variant, but no explicit 'use this when / use X instead when' rule is given. The note that it is refused under --readonly safety profiles is useful context but is a constraint, not a selection guideline.

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