Skip to main content
Glama

get_sheet_data

Read-only

Retrieve values or formatted grid data from a specific Google Sheets sheet, with optional A1 range and local-file output to handle large responses.

Instructions

Get data from a specific sheet in a Google Spreadsheet.

Args: spreadsheet_id: The ID of the spreadsheet (found in the URL) sheet: The name of the sheet range: Optional cell range in A1 notation (e.g., 'A1:C10'). If not provided, gets all data. With include_grid_data=True and no range, the used range is auto-detected (see below) rather than fetching the sheet's full padded grid. include_grid_data: If True, includes cell formatting and other metadata in the response. Note: Setting this to True will significantly increase the response size and token usage when parsing the response, as it includes detailed cell formatting information — densely formatted cells serialize to hundreds of bytes each. If range is omitted, the actual used range is auto-detected first (one extra lightweight values-only request) and formatting is fetched only for that — sheets default to a padded 1000x26 grid regardless of actual content, and fetching per-cell formatting for the full padded grid instead of just your data can produce a response large enough to break the client connection. Default is False (returns values only, more efficient). Raises ValueError if the actual response size exceeds a safety cap (see MAX_TOOL_RESPONSE_CHARS in docs/configuration.md for the configured default — raise it to match a higher MAX_MCP_OUTPUT_TOKENS in your MCP client) and local_path is not set — narrow the range, retry, or pass local_path to bypass the cap entirely. local_path: Optional local filesystem path (file or directory) to write the result to instead of returning it inline. Bypasses the include_grid_data response-size cap. A path ending in '/' is a directory, created if missing. A file in place of a parent directory, or at a path ending in '/', raises ValueError; an existing file at a plain file path is replaced. Same caveat as download_file/download_folder: this path is resolved on the server's filesystem, not the caller's — over SSE that's only useful if the path is on a volume the caller can also reach; for stdio it's the same machine.

Returns: Grid data structure with either full metadata or just values from Google Sheets API, depending on include_grid_data parameter. If local_path is set, returns {local_path, spreadsheet_id, sheet, range, bytes_written} instead.

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": {
      "spreadsheet_id": "<spreadsheet_id>",
      "sheet": "<sheet>"
    },
    "name": "get_sheet_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
rangeNo
sheetYes
local_pathNo
spreadsheet_idYes
include_grid_dataNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.9.6
    • removedInput schema / properties / value_render
      Removed value: -{
      -  "default": "formatted",
      -  "enum": [
      -    "formatted",
      -    "unformatted",
      -    "formula"
      -  ],
      -  "title": "Value Render",
      -  "type": "string"
      -}
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations supply only readOnlyHint, and the description adds substantial behavioral context beyond that: the padded 1000x26 grid default, the extra lightweight request used for auto-detection, the response-size safety cap and its ValueError trigger, and the fact that local_path resolves on the server's filesystem rather than the caller's. These are exactly the operational details an agent needs and none are recoverable from 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded and the Args/Returns structure is easy to scan. It is on the long side, with some repeated phrasing around the size cap and auto-detection, but nearly every sentence carries actionable detail rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter read tool with an output schema present, the description covers cost tradeoffs, failure modes, filesystem resolution, and return shape. An agent has everything needed to call it correctly without consulting external docs.

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 description coverage is 0%, so the description carries the full burden and does so for all five parameters: spreadsheet_id's URL origin, sheet name, A1-notation range format, include_grid_data's cost and default, and local_path's trailing-slash/directory/overwrite semantics. This meaningfully exceeds what the bare schema types convey.

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?

The opening sentence states a specific verb and resource: 'Get data from a specific sheet in a Google Spreadsheet.' The word 'specific' implicitly contrasts with multi-sheet reads, but the description never names get_multiple_sheet_data or get_sheet_formulas, so sibling differentiation is left to inference.

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?

Guidance is strong within the tool's own parameters — when to set include_grid_data True vs False, when to omit range for auto-detection, and when to use local_path to bypass the size cap. However, there is no explicit statement about when to choose this tool over sibling readers such as get_multiple_sheet_data or get_sheet_formulas, so cross-tool selection is only implied.

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