Source schema
Reads the data source's own schema, as last introspected from the warehouse or uploaded as DDL. This is the layer beneath the context: every table the source has, including ones the context does not model at all.
Use it during triage when a fix needs data the context does not carry yet, for instance to inspect the columns of the unmapped tables a reference_tables fix proposal names. See Issues.
Parameters
| Name | Type | Notes |
|---|---|---|
project_id | UUID | The project whose source to read. Optional with an API key scoped to one project, which it defaults to |
tables | list of strings | Fully qualified schema.table names to detail, at most 20 per call. Omit to list every table without columns |
Response
| Field | Notes |
|---|---|
schema_version | The source-schema snapshot number and when it was taken |
tables | [{name, status, column_count}] |
detailed | Only when tables was passed. Each relation includes its name, status, object kind, catalog, source comment, view definition, approximate row count, primary and foreign keys, declared constraints, and columns. Columns include type, nullability, source comment, default expression, and generated expression |
error | Set instead of the keys above when the request fails. A project with no source schema yet returns an error telling you to sync it or upload a DDL first |
Status has two values, and the difference matters when deciding whether a table needs modeling:
| Status | Meaning |
|---|---|
modeled | Added to the context |
tracked | In the current schema only, not in the context: no domain, no description |
This is an interactive lookup, capped at 20 detailed tables per call. For bulk work across a whole schema, cassis schema pull writes the same schema to a gitignored local snapshot an agent can grep in one pass. Paging through this tool during a modeling sweep is the slow way to do it.
The schema here is observed state, not the context. Adding a table to the context means writing its file in the repository or creating it in the app, not calling a tool: see the capability matrix.