upload_file
Upload Excel, CSV, or PDF files to Subindex for research table generation and validation. Supports direct upload via local transport or presigned URL for remote servers.
Instructions
Upload a file to Subindex.
RECOMMENDED: always try with file_path first. If the server can read the file (stdio/uvx transport), it uploads in one step and returns session_id
s3_key immediately. If the server is remote (HTTP/Railway transport), file_path raises "File not found" — in that case call again without file_path to get a presigned S3 upload_url and curl_command instead.
With file_path (one step — stdio/uvx transport): upload_file(filename="data.xlsx", file_type="excel", file_size=12345, file_path="/abs/path/data.xlsx") → server reads + uploads → returns session_id, s3_key
Without file_path (two step — HTTP/Railway transport or any remote server): upload_file(filename="data.xlsx", file_type="excel", file_size=12345) → returns upload_url + curl_command → run the curl_command (requires shell/Bash access), then call start_table_validation(session_id, s3_key, filename)
Note: the two-step path requires shell access to run curl. If you have no shell (e.g. Claude Desktop), use the stdio/uvx transport instead so file_path works.
file_type must be one of: "excel", "csv", "pdf" The presigned URL expires in ~15 minutes — run curl immediately.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Original filename including extension (e.g. 'data.xlsx', 'report.csv', 'doc.pdf'). | |
| file_type | Yes | File format — must be one of: "excel", "csv", "pdf". | |
| file_size | Yes | File size in bytes. Run: stat -c%s <file> (Linux/macOS) or (Get-Item '<file>').Length (PowerShell). | |
| file_path | No | Absolute local path to upload directly (uvx/local transport only — the MCP server reads the file). Omit when using HTTP/Railway transport; the response curl_command handles the upload instead. | |
| session_id | No | Optional existing session ID to associate this upload with. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |