Get spreadsheet metadata
get_spreadsheetInspect 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
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Partial-response field mask, e.g. "sheets.properties" or "namedRanges". | |
| ranges | No | Limit the returned sheets/grid data to these A1 ranges. | |
| spreadsheet_id | Yes | The spreadsheet id — the long id from the URL (docs.google.com/spreadsheets/d/<spreadsheetId>/edit) or from create_spreadsheet / search_spreadsheets output. | |
| include_grid_data | No | Embed cell data (values, formats) in the response. Heavy — prefer read_values. |