export_query_to_csv
Execute a SELECT query and export its result set to CSV format. Use it to turn JOINs, aggregations, or parameterized reads into CSV files with optional column headers.
Instructions
📄 Executes a SELECT query and exports results to CSV format. Requires both utility and read permissions. Supports complex queries with JOINs and aggregations.
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": {
"query": "<query>"
},
"name": "export_query_to_csv"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | SQL SELECT query to execute and export | |
| params | No | Optional array of parameters for parameterized queries | |
| include_headers | No | Whether to include column headers in the CSV output |