Skip to main content
Glama

Sheets Get Spreadsheet

sheets_get_spreadsheet
Read-onlyIdempotent

Read a Google Sheets spreadsheet's title, locale, tabs, sheet IDs, and grid dimensions; optionally include displayed cell values to inspect structure or prepare edits.

Instructions

Read a spreadsheet's structure: its title, locale and every sheet (tab) with its ID and grid size. The spreadsheet_id comes from drive_list_files, search_workspace or sheets_create_spreadsheet; for cell values use sheets_read_sheet_values. Returns spreadsheet_id, title, locale, spreadsheet_time_zone (the file's own setting), url, named_ranges (name, named_range_id, A1 range) and sheets, each with sheet_id, title, index, type, row_count, column_count, frozen_row_count, frozen_column_count and hidden. With include_grid_data each sheet also has values (displayed cell text) and values_start (the cell of values[0][0]), else both are null; format raw returns Google's JSON instead, paged.

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>"
    },
    "name": "sheets_get_spreadsheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNo'normalized' (the default) returns the summary described above. 'raw' returns Google's Spreadsheet resource unchanged in spreadsheet, with the formats, conditional formats, charts, merges, filters, protected and banded ranges and data sources the summary leaves out, for sheets_batch_update_spreadsheet edits; it needs the extended tool tier and fails with invalid_input under MCP_TOOL_TIER=core.normalized
offsetNoRaw only (normalized ignores it): the next_offset of a truncated raw result. Raw pages hold about 32,000 characters of JSON and are cut between whole sheets, the first page holding every other field; joining each list across pages gives Google's resource. raw_chars and raw_sha256 describe the whole resource. 0 starts at the beginning.
rangesNoA1 ranges that limit the response to the sheets (and, with include_grid_data, the cells) they cover, e.g. ['Sheet1!A1:C10']; basic A1 notation as in sheets_read_sheet_values, so a bare sheet name is rejected. Omitted, every sheet is returned.
spreadsheet_idYesGoogle Sheets spreadsheet ID: the Drive file ID, also the long ID in the spreadsheet's URL.
include_grid_dataNoAlso return each sheet's cell values, as displayed, in sheets[].values (raw: Google's data with every cell's formatting); this can be very large, so limit it with ranges. For values alone use sheets_read_sheet_values.

Output Schema

NameRequiredDescriptionDefault
urlNo
titleNo
formatNo
localeNo
sheetsNo
raw_charsNo
truncatedNo
raw_sha256No
next_offsetNo
spreadsheetNo
named_rangesNo
element_countNo
spreadsheet_idNo
spreadsheet_time_zoneNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds real context: include_grid_data can be very large, raw is paged at ~32,000 chars cut between whole sheets, raw requires the extended tool tier and fails with invalid_input under core. The only gap is that it doesn't restate quota/rate behavior, but for a read tool this is well above the annotation bar.

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?

Front-loads purpose, then ID provenance, then alternatives, then the return shape — a sensible order. The long enumerated return-field sentence is dense and could be trimmed since an output schema exists, keeping it just short of a 5.

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 5-parameter read tool with full schema coverage, annotations and an output schema, nothing an agent needs to invoke it correctly is missing: provenance of the ID, the raw/normalized tradeoff, paging, tier constraint, and size caveats are all covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema doesn't: values and values_start are null unless include_grid_data is set, ranges must be basic A1 so a bare sheet name is rejected, and offset is ignored in normalized mode. That is genuine additive semantics rather than restatement.

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?

Opens with a specific verb and resource: 'Read a spreadsheet's structure: its title, locale and every sheet (tab) with its ID and grid size.' It explicitly draws the boundary against sheets_read_sheet_values for cell values, so an agent can pick it apart from the nearest sibling 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 concrete upstream tools that supply spreadsheet_id (drive_list_files, search_workspace, sheets_create_spreadsheet) and routes value-reading to sheets_read_sheet_values, plus tells the agent to use ranges to bound large include_grid_data responses and that raw needs the extended tier. When-to-use, where-the-ID-comes-from, and the alternative are all stated.

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