origami_upload_csv
Create an Origami TABLE from a CSV — the ingest verb
POST /workspaces/{id}/documents, JSON with the file base64-encoded (never
multipart). WRITE.
mode="table" (default): the CSV becomes a NEW table in workspace_id,
its header row = the input columns. mode="append" is REFUSED: Origami
does not bind the CSV header to the table's columns and creates new ones
on every call — rows go into an existing table with
origami_rows(op="upsert", table_id=…, match_columns=[…]), which checks
the column slugs. dry_run=True parses the CSV and
returns {dry_run: true, would_upload: {filename, mode, columns, rows, preview}} (first rows) without uploading. The real call returns the per-file
results[] (an entry may be kind: "error"); the new table then appears in
origami_tables(op="list", workspace_id=…).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace_id": "<workspace_id>",
"filename": "<filename>",
"csv_text": "<csv_text>"
},
"name": "origami_upload_csv"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _org | No | Org (id) de CET APPEL. `oto_list_orgs()`. | |
| mode | No | "table" (new table, default); "append" is refused (see above). | table |
| _group | No | Équipe (id) de CET APPEL, sous son org parente. | |
| _run_id | No | OBLIGATOIRE à chaque appel dès `run_start` ou `data_claim_next` : sans lui, l'écriture sur une ligne réservée est refusée. Hérité seulement si le serveur tient un run actif — n'y compte pas. | |
| dry_run | No | preview the parsed CSV, upload nothing. | |
| _project | No | Projet (id) de CET APPEL — jeton PRIMAIRE. `oto_project(op='list')`. | |
| csv_text | Yes | the CSV content, header row first, UTF-8. | |
| filename | Yes | name ending in `.csv` (e.g. "grossistes-fr.csv"). | |
| table_id | No | only named back in the refusal of mode="append". | |
| _instance | No | Instance de connecteur PRÉCISE (un credential exact). `oto_instance(op='list')`. | |
| workspace_id | Yes | target workspace (`origami_workspaces`). |