list_table_structure
Show columns of a PerfettoSQL table or view: name, type, nullability, primary key flag. Helps resolve 'no such column' errors by revealing the schema.
Instructions
Show the columns of a table or view: name, type, nullability, primary_key flag.
Use when: writing or debugging a query — call this immediately after a no such column error to inspect the actual schema rather than guessing. Both stdlib views and base tables have fixed schemas; don't infer columns by analogy across them.
Don't use for: this is a separate MCP tool, not a SQL function — don't write SELECT * FROM list_table_structure inside execute_sql.
Parameters: table_name (string) — the exact table or view name as it appears in list_tables output. Case-sensitive; does not accept GLOB patterns or partial matches. Also accepts the alias name (v0.11.3+).
Errors when: the table doesn't exist or has no columns. Call list_tables first; stdlib views may need an INCLUDE first.
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": {
"table_name": "<table_name>"
},
"name": "list_table_structure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trace_id | No | Optional trace id returned by `load_trace`. Omit to use the active trace. | |
| table_name | Yes | Name of the table to describe. Also accepted as `name` for callers who model schema discovery around a generic "name" field. |