inspect_model
Inspect a semantic model to get a complete compact view of its columns, measures, joins, samples, and metadata without writing SQL.
Instructions
DEPRECATED: use the inspect tool. Return a complete-yet-compact view of a semantic model.
Always emitted (regardless of sections): model header + description,
metadata bullets (data_source, sql_table, default_time_dimension,
hidden, row_count), backing-query structure for query-backed models,
and — when show_sql=True — the custom SQL block, model-level
filters, and the cached backing-query SQL.
Section-gated parts (subset selectable via sections):
columns— unified row-level columns table with asampledcolumn (distinct values for string/boolean,min .. maxfor number/date/time, ortop20 ... (N distinct)for high- cardinality categoricals).measures— named-formula library.aggregations— custom aggregation definitions. Theformulacolumn and thesqlfield of eachparams[]entry are gated byshow_sql.joins— join definitions.samples— live sample-data query (COUNT(*)plus one aggregation per column).learnings— learning-only memories whose canonical entities reference this model.
When a section is omitted from sections: columns, measures,
aggregations and joins collapse to a one-line backticked CSV
of names; samples and learnings are dropped entirely.
A footer at the end of the response lists what was trimmed and how
to fetch more.
Args:
model_name: Name of the model to inspect.
num_rows: Max sample-data rows (default: 3).
show_sql: When true, include the generated SQL for the sample-data
query, the custom SQL block, model-level filters, the cached
backing-query SQL, and aggregation formulas/param SQL.
format: Output format — "markdown" (default) or "json".
Case-insensitive.
sections: Subset of ["columns", "measures", "aggregations", "joins", "samples", "learnings"]. Default (None
or empty list) renders all six. Unknown names are ignored
with a warning line at the end of the response. A non-empty
list of only unknown names resolves to no sections (not
all six) — "all sections" is reserved for None/[] so
a typo can't silently trigger the full expensive payload.
descriptions_max_chars: When set, every description field (model,
column, measure, aggregation) longer than this is truncated
with a ... [truncated] suffix. Must be >= 0. None
(default) means no truncation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | markdown | |
| compact | No | ||
| num_rows | No | ||
| sections | No | ||
| show_sql | No | ||
| model_name | Yes | ||
| data_source | No | ||
| descriptions_max_chars | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |