Skip to content

SQL Extension

The SQL extension lets users query databases from inside inboard documents. It supports two connection modes.

Connects directly to a Turso HTTP API. Use this for cloud-hosted SQLite databases.

Configuration:

{
"url": "https://your-db.turso.io",
"auth_token": "your-turso-auth-token"
}

Routes queries through Concourse to on-premises databases via the relay. Use this for databases behind a corporate firewall.

Configuration:

{
"connection_id": "finance-prod",
"concourse_url": "https://your-concourse.example.com",
"auth_token": "user-jwt-token"
}

The SQL extension exposes four tools for use in documents:

ToolDescriptionParameters
execute_sqlRun a SQL query and return columns and rows.sql (string)
list_tablesList all tables in the connected database.None
describe_tableGet column names, types, and nullability for a table.table (string)
table_schemaGet detailed schema with normalized type information.table (string)
SELECT department, SUM(revenue) as total_revenue
FROM sales
WHERE fiscal_year = 2025
GROUP BY department
ORDER BY total_revenue DESC

Returns:

{
"columns": ["department", "total_revenue"],
"rows": [
["Enterprise", 4500000],
["SMB", 2100000],
["Consumer", 890000]
]
}

Returns all tables in the database:

{
"tables": ["sales", "customers", "products", "invoices"]
}
{
"columns": [
{"name": "id", "type": "integer", "nullable": false},
{"name": "department", "type": "text", "nullable": false},
{"name": "revenue", "type": "real", "nullable": true},
{"name": "fiscal_year", "type": "integer", "nullable": false}
]
}
MethodPathDescription
POST/api/v1/connections/{id}/queryExecute a SQL query. Body: {"sql": "..."}
POST/api/v1/connections/{id}/introspectSchema introspection. Body: {"action": "list_tables"} or {"action": "describe_table", "table": "..."}

See Connections API for full details.