Prepare Source Upload
prepare_source_uploadCreate a staged source upload session and return temporary upload targets.
Returns an `upload_id` and one target per declared file (`url` and form
`fields`). Each target accepts a `multipart/form-data` POST containing
every entry of `fields` followed by the file bytes in the `file` field.
Upload URLs expire after an hour and accept only the declared byte size.
Staged files do not replace the agent's source until `complete_source_upload`
succeeds.
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": {
"agent_id": "<agent_id>",
"files": "<files>"
},
"name": "prepare_source_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | The files to stage, each {"path": relative path, "size": bytes, "sha256": hex digest}. Either one archive (.tar.gz, .tgz, .tar), or up to 200 individual UTF-8 text files with their paths relative to the agent's root. At most 64 MB in total. | |
| agent_id | Yes | The agent's stable ID, such as agt_1a2b3c4d, from list_agents. |