Run SQL
query_run_sqlRuns a read-only SQL SELECT against one uploaded spreadsheet and returns the result rows. Table names come from query_describe — call that first. Use this instead of reading the file when the caller wants an aggregate, a filter, or a computed answer rather than the raw rows. Only SELECT is allowed, and only tables from the named file are in scope.
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>",
"path": "<path>",
"context": "<context>"
},
"name": "query_run_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A single read-only SQL SELECT statement. Table names must come from query_describe. | |
| path | Yes | VFS path of the spreadsheet to query, e.g. '/finance/sales.xlsx'. | |
| context | Yes | Explain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): "Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization." | |
| workspace_id | No | Which workspace to act in - a workspace id (whoami returns the id of your default workspace). Omit to use your default workspace. | |
| output_format | No | Use 'table' if the user asked to see a visual report. Use 'csv' for large data transfers. Use 'json' if you need to process the data internally. | json |