Get an upload URL for a sandbox file
create_upload_urlGenerate a short-lived URL to upload a file directly into a sandbox by PUTting the raw request body; missing directories are created and the URL expires after a set TTL.
Instructions
Get an upload URL for a sandbox file. Returns a short-lived URL that the sandbox serves itself. PUT the file as the raw request body to write it, with no size limit and no Authorization header. Missing directories are created; an existing file is replaced only once the upload completes. The URL is bound to this path and expires after ttlSeconds (default 15 minutes, at most 1 hour). Needs file.write. Treat the URL as a secret until it expires.
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": {
"sandboxId": "<sandboxId>",
"path": "<path>"
},
"name": "create_upload_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path, or path relative to the sandbox work directory (/home/user). It must resolve under /home/user or /tmp. | |
| sandboxId | Yes | Public Sandbox id returned by create/list/get sandbox calls. | |
| ttlSeconds | No | How long the URL stays valid. |