export_csv
Run a query and stream its full result table to a CSV file, returning only the file path, row count and byte size so the rows never enter the conversation.
Instructions
The CSV-only shortcut for export_result: run a query and write its complete table to a CSV file (RFC 4180, exact digits, formula-injection safe). Returns only the path, row count and byte size — the rows themselves never enter the conversation. The query must produce a table: use | pluck(…), | group(…) or | distinct. The file is streamed and published atomically, with the same 50 MB limit; an existing path is refused unless overwrite=true. Pass filePath to open and export an input file in one call, or docId to reuse an open document. For JSONL or nested values use export_result; for linked multi-table spreadsheets, convert.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docId | No | A docId returned by load_doc. | |
| query | Yes | A query producing rows or groups. | |
| outPath | Yes | Where to write the CSV file. | |
| filePath | No | Input file to open now instead of supplying docId. | |
| overwrite | No | Replace an existing path atomically (default false). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| hint | No | ||
| tool | Yes | ||
| error | No | ||
| evicted | No | ||
| structuredTruncated | No |