Query data
query_dataRun governed read-only SELECT queries against Trino and Apache Pinot lakehouses; SQL is safety-checked, table-allowlisted, budget-priced, and returns capped rows or fixable rejection messages.
Instructions
Run a read-only SELECT and get the rows back.
Write a single SELECT in the engine's dialect. The query is checked
for safety, priced against your budget, and executed with a row cap —
so name the columns you need (no SELECT *), and add WHERE filters to
keep the scan small. At most 1,000 rows come back by default (a
larger LIMIT is lowered to the cap), and `truncated` marks a result
the cap cut off. A query that touches any table outside your grant
is refused before it runs. If it is rejected, the message says what
to fix. Describe the tables first so column and table names are exact.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "query_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One SELECT in the engine's dialect, naming each table as catalog.schema.table and each column it needs. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| columns | Yes | ||
| warnings | No | ||
| row_count | Yes | ||
| truncated | No |