query_data
Run read-only SQL queries against in-memory TickerDB market data tables to filter and analyze saved results, returning up to 200 rows or exporting full results to CSV.
Instructions
Read-only SQL (SQLite) over tables saved with store_as: SELECT or WITH, plus SHOW TABLES and DESCRIBE . Returns at most 200 rows; output_path writes the full result to a CSV file for bulk work. Nested fields are flattened with _ (trend.direction -> trend_direction); booleans are 1/0. Tables live in memory for this server process.
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_path | No | CSV file path for the full result (every row). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | The tool's result. |