Fx Dataframe Query
fx_dataframe_queryRun a read-only SQL SELECT against DataCanvas tables staged by fx_get_timeseries. Supports aggregations, GROUP BY, window functions, and JOINs across multiple registered tables. Run fx_dataframe_describe first to discover table names and column schemas. Requires DataCanvas, which is on by default — a deployment that turns it off does not list this tool at all, and fx_get_timeseries returns every range inline there.
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": {
"canvas_id": "<canvas_id>",
"query": "<query>"
},
"name": "fx_dataframe_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Read-only SQL SELECT statement. Reference tables by the names returned by fx_dataframe_describe or the table_name field from fx_get_timeseries. Example: SELECT date, rate FROM <table_name> WHERE date > '2024-01-01' ORDER BY date; replace <table_name> with the returned name, including its unique suffix. | |
| canvas_id | Yes | Canvas ID returned by fx_get_timeseries. Re-run fx_get_timeseries to obtain a fresh canvas_id if this one has expired. | |
| row_limit | No | Most rows to return (positive integer, default 150); values above the canvas row cap (10,000 by default) clamp to it with a notice. When the query produces more, truncated is true — page with ORDER BY <column> LIMIT <n> OFFSET <m> in the SQL, or aggregate, rather than raising this toward the maximum. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | Result rows, at most row_limit (default 150). Each key is a column name from the query. | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Reports requested and effective row limits when clamped, and the ORDER BY … LIMIT … OFFSET query shape when the result is truncated. | |
| canvas_id | No | The canvas ID used — pass to a subsequent fx_dataframe_query or fx_dataframe_describe call. | |
| row_count | No | Rows returned — always the length of rows. When truncated is true this equals row_limit, not the full result size. | |
| truncated | No | True when the query produced more rows than row_limit and rows holds only the first row_limit of them. Fetch the rest with ORDER BY <column> LIMIT <n> OFFSET <m> — ORDER BY is required for deterministic paging — or aggregate to shrink the result. |