Upload a file into a draft's field
media_upload_commandAn image file (PNG, JPEG, WebP or SVG, up to 4 MB) or a clip (MP4 or MOV, up to 40 MB) is too big to send as a tool argument: this answers the exact HTTP request, and a curl command, that puts the file into one of the draft's image or clip fields, checked like any value. Run it from your shell with the file's path.
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": {
"id": "<id>",
"field": "<field>"
},
"name": "media_upload_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The draft's id (draftId). | |
| file | No | The file's path, to write it into the command (its extension says its type). | |
| field | Yes | An image or video field (get_template lists them). | |
| editToken | No | The draft's editToken, to write it into the command (left out, the command has a placeholder). |