db_get_schema
Retrieve a table's column schema merged with saved annotations. Fetches from database when cache is missing or a refresh is requested.
Instructions
Get column schema for a table, merged with any saved semantic annotations.
Checks the local cache first; fetches from the database on cache miss or
when force_refresh=True. Saves the result to cache for future calls.
Merges column descriptions, enum value mappings, and FK references from
previous db_annotate() calls into the response.
Args:
table: Table name, optionally schema-qualified. Use whatever your
DB uses — e.g. "users", "public.users" (Postgres),
"dbo.Orders" (MSSQL), "mydb.orders" (MySQL).
connection: Connection name. Defaults to first defined.
force_refresh: Bypass cache and fetch fresh schema from the database.
Returns:
{table, connection, columns (with annotations merged in), table_description, cached}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| connection | No | ||
| force_refresh | No |