Skip to content

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

NameTypeRequiredDefaultDescription
project_namestrYes
spreadsheet_id`strNone`NoNone
source_name`strNone`NoNone

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.

{
"name": "get_spreadsheet_metadata",
"arguments": {
"project_name": "forecasts",
"spreadsheet_id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789ABCDEFG"
}
}
{
"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.