csv_to_bundle
Convert raw CSV exports like shift logs or production/downtime spreadsheets into the bundle format run_agent expects, with column mapping and unmapped-field warnings.
Instructions
Turn a raw CSV export - a shift log, a production or downtime spreadsheet - into the bundle shape run_agent expects. Calls POST /api/tools/csv-to-bundle: header-to-field mapping only, no model involved, nothing retained, no quota consumed.
Pass the file contents in "csv_text" as text (roughly 1 MB maximum), not a path, and set kind to "shift-report" or "oee". Returns the bundle plus mapped_columns, unmapped_columns, and warnings. Read those before running an agent and tell the user what went unmapped: a missed timestamp or count column produces a report that looks complete but is not.
WHEN TO CALL: the user has a spreadsheet and no namespace yet. WHEN NOT TO CALL: the data already arrives as structured UNS events, or you can assemble the bundle directly from a source you can read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| csv_text | Yes | ||
| site_profile | No |