Create an upload link
create_upload_linkGet a one-time address to send a local file to, for an agent that can run a shell. PUT the file's bytes to upload_url (the answer includes a curl command), then call compress_images with the upload_id. The link expires after a few minutes and works once; the uploaded file keeps for about a day. Ask for one link per file. Uploads not yet compressed never outnumber the images the plan can still compress today, and never more than a fixed number of them: past that, a new link is refused with uploads_waiting, naming the upload ids already sent: compress those, then ask again.
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": {
"file_name": "<file_name>"
},
"name": "create_upload_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_name | Yes | The file's name, like "hero.png". It names the image; the extension is corrected to what the bytes turn out to be. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| curl | No | A command that sends the file. | |
| next | No | ||
| method | No | ||
| upload_id | No | The id to pass to compress_images in upload_ids once the file is sent. | |
| expires_at | No | ||
| upload_url | No | ||
| max_file_size | No | Bytes. |