oto_import
Load a file the server can reach into a table or a project — the content never goes through the conversation. Use it instead of data_write rows for any file (CSV export, Google Sheet, Clay export, attachment). CSV: , ; or tab, UTF-8 / UTF-16 / cp1252, headers matched to column keys or labels; new headers become text columns. Pass key so a re-run updates instead of appending. A big file stops after ~40 s with resume_from: call again with it and source_sha256.
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": {
"source": "<source>"
},
"name": "oto_import"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Column that DESIGNATES a row: a re-run then updates instead of appending, no `upsert` needed. Omitted, the file matches on the declared key but ADDS. Default: the table's declared key. | |
| _org | No | ||
| title | No | ||
| format | No | Default: from the file name or type. | |
| source | Yes | Where the file is: `{kind:"url", url}` (public link; a Google Sheets share link works if the sheet is public, `gid` picks the tab), `{kind:"drive", file_id}` (your Google account; a native Sheet exports its first tab as CSV), `{kind:"project_file", project_id, file_id}`, `{kind:"gmail", message_id, filename}`, a messaging attachment's `source` as read (`{kind:"unipile", channel, url}`), a recording's `source` as read (`{kind:"transit", ref}`), or a file YOU produced: `{kind:"content", filename, base64}` (or `text` instead of `base64`), 256 KB at most. With `target="project_file"`, the file is filed in the project as is. | |
| target | No | datastore | |
| upsert | No | `true` = MERGE when the key value already exists — for a write that ADDS (neither `id` nor `key=`), and for rows of one call that share a key value. A write that designates by `key=` needs no `upsert`. Every merge of a batch comes back in `fusions`. Without it, an adding write on an existing key, or two rows of one call on the same key, is REFUSED (`business_key_exists`). Refused on a table with no business key: there is nothing to merge on. | |
| filename | No | project_file only. Default: the source's file name. | |
| datastore | No | ||
| separator | No | CSV only. Default: detected. | |
| project_id | No | ||
| description | No | ||
| resume_from | No | From a previous receipt, when the file did not fit one call. Needs `source_sha256`. | |
| source_sha256 | No | From the previous receipt: the resume is refused if the file changed. | |
| declare_columns | No | Declare headers that match no column as text columns (label = header); for NDJSON, keys no column declares, typed from their values. Existing columns are never changed. Off, a column the schema does not declare is refused. | |
| origine_override | No | `origine_override=true` states that this call sets the `origine` layer (the value at the START, at import time) knowingly. Without it, writing an origin is refused. ⚠️ Nothing captures an origin automatically any more: `origine: "system"` was REMOVED on 2026-09-08, so writing the value alone keeps nothing — an overwrite is final. For a real IMPORT, prefer `donnees_d_origine=true`, which writes both versions — the current value and the origin — in the same gesture, at the moment the value enters. This parameter only says "I know I am setting that layer", and it applies to this call only. A cell without an `origine` layer has no known starting value: the absence of the layer says so, never a text in its place. | |
| donnees_d_origine | No | `donnees_d_origine=true` sets the FIRST version of the data (the origin) and marks the write as an import in the journal: this call brings data AS THE CLIENT HANDED IT OVER. Each cell gets its `origine` version frozen at the same time as its current value, carrying the same layers: put the provenance in `<field>.comment` and it lands in both. Use it for the import itself, NOT for enrichment — what an agent establishes is the current version. An origin already set is never overwritten (a re-import updates the current version and leaves the origin alone), and an empty cell gets nothing: the client handed over nothing there, which is not the same as handing over an empty value. |