get_spreadsheet_metadata
Return metadata for a connected Google Sheet: the spreadsheet title, and for each tab the sheet ID, title, index, type, row count, and column count. Use this before write-back tools (write_gsheet) to discover available tabs and their dimensions. Target the sheet by source_name (from list_data_sources) OR spreadsheet_id — source_name is preferred for linked sheets. The spreadsheet must already be connected via connect_google_sheet. Returns: spreadsheet_id (str); title (str) — spreadsheet title; sheets (list) — per-tab metadata with sheetId, title, index, sheetType, rowCount, columnCount; sheet_url (str) — URL to open the sheet. On error: error (str) — error code; message (str); hint (str).
read-only · idempotent
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
project_name | str | Yes | — | |
spreadsheet_id | `str | None` | No | None |
source_name | `str | None` | No | None |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
spreadsheet_id(string)title(string)sheets(array<object>)sheet_url(string)
See the response example below for the full payload shape.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "name": "get_spreadsheet_metadata", "arguments": { "project_name": "forecasts", "spreadsheet_id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789ABCDEFG" }}Response
Section titled “Response”{ "spreadsheet_id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789ABCDEFG", "title": "FY26 Forecast", "sheets": [ { "sheetId": 0, "title": "Forecast", "index": 0, "sheetType": "GRID", "rowCount": 1000, "columnCount": 26 }, { "sheetId": 12345, "title": "Notes", "index": 1, "sheetType": "GRID", "rowCount": 1000, "columnCount": 26 } ], "sheet_url": "https://docs.google.com/spreadsheets/d/1aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789ABCDEFG/edit"}- Module:
Export to Sheets - Requires authentication via API token or Auth0 JWT.