query_data
Run a read-only SQL SELECT against the app's SQLite database to create a named dataset that boards can visualize.
Instructions
Run one read-only SQL SELECT against the app's SQLite database and keep the rows as a dataset named name that boards can draw. The database computes every number: aggregate, sort and round in SQL, not in your head. Returns the columns, the row count and the first rows. At most 5000 rows per query. Reusing a name replaces that dataset.
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": {
"name": "<name>",
"sql": "<sql>"
},
"name": "query_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| name | Yes | Dataset name boards will use, e.g. top_products | |
| preview_rows | No | Rows to return to you (default 15) |