Knowledge API & MCP · Reference

Database tools

Ask questions of a connected database — in English or governed SQL.

When an agent genuinely needs live data, it queries a connected database directly under governance — a read-only role, query validation, enforced limits and timeouts, and a per-user audit trail. Results flow to the agent; they never land in Chiron's storage. These are the MCP tools that make that possible.

The design principle is *metadata out, SQL in*: Chiron stores knowledge *about* a database — its catalog, classifications, plain-language descriptions — not its rows. Sensitive columns are classified before anything is persisted; live values are fetched only on demand and never stored.

Understand the database

text
list_databases(project_id)
  -> [{ id, name, engine, host, database_name }]     # never passwords

describe_database(project_id, connection_id?, scope="summary", domain?, table?)
  -> catalog: domains, tables, columns, joins, business descriptions
     scope: "summary" | "domain" | "table" | "raw"

ingestion_status(project_id, wait_seconds?)
  -> { readiness: "not_started" | "ingesting" | "building_catalog"
                | "ready" | "degraded" | "failed", status_details }

Ask a question

ask_database turns a business question into governed SQL, runs it read-only, and returns both the answer and the query it used — so the result is auditable, not a black box:

text
ask_database(question, project_id, connection_id?, row_limit=100, timeout_s=15, include_rows?)
  -> { answer, sql, columns, rows_preview, status: "success" | "failed", failure_reason }

Run SQL yourself

When you want exact control, run_sql executes exactly one read-only SELECT under the same limits (gated by ONTOLOGY_ENABLE_RAW_SQL, on by default):

text
run_sql(sql, project_id, connection_id?, row_limit=100, timeout_s=15, include_rows?)
  -> { status, rows, columns, rows_preview, error_code? }

There is also ontology_database_query(project_id, sql, database?, row_limit=50) for a read-only SELECT through the ontology path, and ontology_status() to report the server's connection state, privileges, and which database tools are enabled.

The end-to-end version is Query your connected DB from chat.

Next: Memory API.