infer
Build a semantic layer for a warehouse by modeling metadata and sample values, scoped to selected schemas, so AI agents can query with correct business context.
Instructions
Build the semantic layer for a warehouse. Ask the user first.
This READS THEIR WAREHOUSE -- metadata and sample values -- under the
connection given, and on a real warehouse it takes minutes and uses
their own LLM key, which costs them money. Ask before calling it, and
say which warehouse you are about to model.
connection: a uri from `status.connections`, or one the user gave.
Omit it to use the session's.
question: what the user actually asked. Keep it here: when the layer
is ready, `status` reminds you to answer it, so a run that outlives
this turn does not lose the point of itself.
scope: schema names, comma-separated, to model only those. The way to
make a big warehouse finish quickly.
wait_seconds: how long to hold this call open (capped at 60). A DuckDB
file finishes inside it and comes back `ready`, so you can answer in
the same turn. Anything larger comes back `inferring`.
use_llm: false for a statistics-only layer -- no descriptions, no
decode validation, no cost, and much faster.
While this call is open it streams progress notifications, so a
client that renders them shows a bar. Nothing will wake you AFTER it
returns. Tell the user that, and call `status` when they next speak.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "infer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Schema names, comma-separated, to model only those. | |
| use_llm | No | False for a statistics-only layer: no descriptions, no LLM cost, much faster. | |
| question | No | What the user actually asked, kept so `status` can remind you to answer it when the layer is ready. | |
| connection | No | A uri from `status.connections`, or one the user gave. Omit it to use the session's. | |
| wait_seconds | No | How long to hold this call open, in seconds. Capped at 60. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |