upload_data
Upload a CSV or Excel file as a named data source. IMPORTANT: file_content must be actual base64-encoded file bytes — not a filename, path, or prose description. Obtain it from a file-read tool, a client upload, or a local script (e.g. base64.b64encode(open(‘file.csv’, ‘rb’).read()).decode()). Typical flow: (1) read the file bytes via a file-read tool or upload mechanism, (2) base64-encode them, (3) pass the encoded string here. Passing anything other than real base64-encoded bytes produces a clear error identifying the sourcing problem. The file is converted to Parquet and stored in S3 under {tenant_id}/{project_name}/uploads/{source_name}.parquet. Maximum file size: 100 MB. Schema is inferred automatically with best-effort type coercion. Accepted formats: .csv, .xlsx, .xls. Returns: source_name (str) — data source identifier; project_name (str) — project name; filename (str) — original uploaded filename; s3_key (str) — Parquet file location in S3; row_count (int) — number of rows ingested; columns (int) — number of columns; schema (dict[str, str]) — column-name to data-type mapping; parquet_size_bytes (int) — size of the stored Parquet file.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
project_name | str | Yes | — | |
source_name | str | Yes | — | |
file_content | Annotated[str, Field(max_length=MAX_FILE_CONTENT_CHARS, description='Base64-encoded binary content of the file. Must be obtained from an external source — a file-read tool result, a client upload, a local script, or a prior tool output that returns base64 content. Do NOT pass a filename, path, or text description.')] | Yes | — | |
filename | str | Yes | — |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
source_name(string)project_name(string)filename(string)s3_key(string)row_count(integer)columns(integer)schema(object)parquet_size_bytes(integer)
See the response example below for the full payload shape.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "name": "upload_data", "arguments": { "project_name": "forecasts", "source_name": "actuals", "file_content": "PEJBU0U2NCBPRiAuY3N2IEZJTEUgQ09OVEVOVD4=", "filename": "actuals_2026q1.csv" }}Response
Section titled “Response”{ "source_name": "actuals", "project_name": "forecasts", "filename": "actuals_2026q1.csv", "s3_key": "tenants/acme/forecasts/revenue/data.parquet", "row_count": 24, "columns": 4, "schema": { "month": "DATE", "revenue": "DOUBLE", "cogs": "DOUBLE", "headcount": "BIGINT" }, "parquet_size_bytes": 2048}- Module:
Data - Requires authentication via API token or Auth0 JWT.