save_structured
Save extracted JSON or CSV data to a file within the allowed directory, creating parent directories as needed.
Instructions
Write extracted data to a file inside the allowed root.
Args: path: Output file path inside the allowed root; parent directories are created as needed. data: The data to write, as a JSON string. For 'csv' it must be a JSON array of flat objects (no nested arrays/objects). format: 'json' (pretty-printed) or 'csv'.
Returns {path, format, rows, bytes}; 'rows' is the row count for csv or the element count when the JSON payload is an array, otherwise null.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| path | Yes | ||
| format | No | json |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||