get_table_schema
Inspect a BigQuery table's columns, partitioning, size, and freshness before querying. Reveals partition filters and nested fields needing UNNEST—without scanning data.
Instructions
Get a table's columns, partitioning, size and freshness. Free — scans no data.
Call this before writing a query, for two reasons beyond column names:
partitioningsays whether a WHERE clause can actually limit the scan. A date-shaped column name does NOT mean the table is partitioned; if this field is null, every query reads the whole table.Nested columns are expanded to dotted paths and flagged
repeated, which is what tells you a column needs UNNEST.
Args: dataset_id: The dataset, e.g. "events_raw". table_id: The table or view name. environment: Which configured BigQuery environment to use. Omit to use the default. Call list_environments to see what exists.
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": {
"dataset_id": "<dataset_id>",
"table_id": "<table_id>"
},
"name": "get_table_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table_id | Yes | ||
| dataset_id | Yes | ||
| environment | No |