query_data
Read-only SQL (SQLite) over tables saved with store_as: SELECT or WITH, plus SHOW TABLES and DESCRIBE . Returns at most 200 rows. Nested fields are flattened with _ (trend.direction -> trend_direction); booleans are 1/0. Tables are kept per API key and deleted 24 h after last use; format=csv returns CSV text.
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 statement. | |
| format | No | csv: rows as CSV text. Default json. | |
| max_rows | No | Default 200. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | The tool's result. |