upload_data_source
Create a new data source from an inline base64-encoded file (CSV, TSV, JSON, Excel, TXT, PDF). The file goes through the same validation and preprocessing as a web upload. Returns the data_source_id you can pass to run_analysis as soon as preprocessing completes (poll get_data_source_schema for readiness or pass wait_seconds to block here).
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": {
"name": "<name>",
"format": "<format>",
"data_base64": "<data_base64>"
},
"name": "upload_data_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name for the new data source. Shown in the web app and in subsequent list_data_sources calls. | |
| format | Yes | File format. Drives MIME detection and the preprocessing route inside clariBI. csv covers comma-separated; tsv is tab-separated; xlsx is modern Excel; json must be a top-level array of objects or a single object. | |
| data_base64 | Yes | Base64-encoded file contents. Maximum 25 MB encoded (~18 MB raw). For larger payloads, host the file at a public URL and use ingest_url_data_source. | |
| description | No | Optional human-readable description. Surfaces in the web app and in get_data_source_schema. | |
| wait_seconds | No | How long (seconds) to wait for preprocessing to finish before returning. 0 returns immediately with status="preprocessing"; the caller polls get_data_source_schema or list_data_sources. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| format | Yes | Detected file format (csv, json, xlsx, ...). | |
| status | Yes | Preprocessing status. Poll get_data_source_schema until "active". | |
| web_url | No | ||
| raw_data_id | Yes | ||
| bytes_uploaded | Yes | ||
| data_source_id | Yes |