Skip to main content
Glama

Get spreadsheet metadata

get_spreadsheet
Read-onlyIdempotent

Inspect a Google Sheets file's structure: sheet properties, named ranges, tables, charts, and protections. Use it first to locate sheet IDs and rule indexes for later operations.

Instructions

Returns the spreadsheet's structure: properties (title, locale, timeZone), sheets[] with properties (sheetId, title, index, gridProperties incl. rowCount/columnCount and frozenRowCount/frozenColumnCount), plus each sheet's protectedRanges, conditionalFormats, tables and charts, and the spreadsheet's namedRanges. Call this FIRST whenever a structural tool needs a sheetId, protectedRangeId, tableId, chartId or a conditional-format rule index — titles are not addresses. By default no cell data is returned; include_grid_data=true (optionally limited to ranges) embeds cells but is heavy — prefer read_values for data. fields is a partial-response mask to trim the payload, e.g. "sheets.properties".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsNoPartial-response field mask, e.g. "sheets.properties" or "namedRanges".
rangesNoLimit the returned sheets/grid data to these A1 ranges.
spreadsheet_idYesThe spreadsheet id — the long id from the URL (docs.google.com/spreadsheets/d/<spreadsheetId>/edit) or from create_spreadsheet / search_spreadsheets output.
include_grid_dataNoEmbed cell data (values, formats) in the response. Heavy — prefer read_values.
Behavior5/5

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

Annotations already mark the tool as read-only and idempotent, and the description adds important behavioral context: by default no cell data is returned, include_grid_data is heavy, and fields is a partial-response mask. This goes beyond the annotations without contradicting them.

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?

The description is dense but every sentence earns its place: it inventories the returned structure, states the triggering usage rule, and warns about payload weight. It is front-loaded with the most important information and contains no 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 read-only metadata tool with no output schema, the description fully covers return shape, default behavior, parameter trade-offs, and when to call it. An agent has everything needed to select and invoke the tool correctly.

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, and the description adds extra meaning: include_grid_data is described as heavy, fields is positioned as a payload-trimming mask, and ranges are explained in A1 notation. This is above the baseline but still not a fully exhaustive parameter contract.

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?

The description states a specific verb and resource ('Returns the spreadsheet's structure') and enumerates the exact payload components, so an agent immediately understands what the tool does. It also distinguishes itself from read_values, which covers cell data retrieval, making sibling differentiation clear.

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?

The description explicitly says to call this tool FIRST whenever a structural tool needs ids like sheetId, tableId, or chartId, and warns that titles are not addresses. It also directs agents to prefer read_values for cell data, giving clear when-to-use and when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/A1-x-Tech/mcp-google-sheets'

If you have feedback or need assistance with the MCP directory API, please join our Discord server