export_result
Write query results straight to a local CSV or JSONL file without passing rows through the conversation. Returns only path, row count, byte size, and completion status.
Instructions
Write every query match to a local file without sending the data through the conversation. JSONL accepts bare filtered matches and preserves nested values; CSV requires | pluck(…), | group(…) or | distinct. The response contains only format, path, exact row count, byte size and complete=true. Exports refuse rather than silently truncate when the 50 MB output safety limit would be exceeded. Output is streamed to a temporary file and published atomically; 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. export_csv is this tool fixed to CSV. Use convert for linked multi-table spreadsheets, and run_query when a bounded answer in the conversation is enough.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docId | No | A docId returned by load_doc. | |
| query | Yes | A path/predicate query, optionally with a table-producing pipe. | |
| format | Yes | Output format. | |
| outPath | Yes | Where to write the result 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 |