import_csv
Import CSV/XLSX accounting data into QuickBooks Online or Xero. Two-step process: first dry-run to preview mapping and missing fields, then confirm to commit the import.
Instructions
Happy-path CSV/XLSX importer. Two-step: first call (without confirmed) auto-resolves the company, uploads the file, and returns the server's proposed mapping plus any missingRequired fields — show this to the user. Re-call with confirmed=true (and the same filePath) to run the real import and poll until it terminates. Returns { stage: 'DRY_RUN' | 'DONE', importId?, status, summary?, proposedMapping?, missingRequired? }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to a .csv, .xlsx, or .xls file. | |
| entityName | Yes | Entity to import as — match list_entities (e.g. 'Journal Entry'). | |
| companyId | No | Optional. If omitted and exactly one ACTIVE company exists, it's picked automatically. | |
| confirmed | No | Set true on the second call to commit the import. Default false (dry-run only). | |
| timeoutSeconds | No | Forwarded to wait_for_import on the confirmed call. Default 600. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stage | Yes | DRY_RUN when confirmed=false (first call); DONE when confirmed=true. | |
| companyId | No | ||
| entityName | No | ||
| importId | No | Present when stage=DONE. | |
| status | No | Final import status (stage=DONE). | |
| proposedMapping | No | Auto-resolved column→field mapping (stage=DRY_RUN). | |
| missingRequired | No | Required target fields the auto-mapper could not resolve (stage=DRY_RUN). | |
| summary | No | Per-type result counts when stage=DONE and the import reached a terminal state. | |
| hint | No | Next-step hint for the LLM. |