upload_file
Upload large files to a Hatchable project by sending chunks (max 64 KB each). Start with chunk_index=0 to receive an upload_id, then send subsequent chunks with the ID, and mark the last chunk as final to assemble the file. Useful for content exceeding single-response limits, like big SPA bundles or seed data.
Instructions
Multipart file upload for content that exceeds a single model response's output token cap (big SPA bundles, large seed data, inline vendor libs).
Flow: first call with chunk_index=0 and NO upload_id — response returns an upload_id. Subsequent calls pass that upload_id with chunk_index=1, 2, 3…. Last call sets final=true to atomically concatenate and commit as one ProjectFile.
Chunks are staged in Redis with a 10-minute TTL. chunk_index overwrites (safe to retry). Max chunk size: 64 KB. Max assembled file: 20 MB.
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": {
"project_id": "<project_id>",
"path": "<path>",
"chunk": "<chunk>",
"chunk_index": "<chunk_index>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID | |
| path | Yes | Destination path | |
| chunk | Yes | Chunk content (max 64 KB) | |
| chunk_index | Yes | 0-based chunk ordinal | |
| upload_id | No | Returned from the first call. Omit for chunk 0. | |
| final | No | Set true on the last chunk to commit |