Add media from a URL
put_mediaAdds a file to the library as a new item; nothing existing is replaced. With url, the user's browser fetches it, so only public https hosts that send CORS headers work. data takes base64 bytes and is limited to about 700 KB, for small generated assets. Larger files on the caller's disk can be sent as an HTTP POST of the raw bytes to /media/upload?token=TOKEN&name=NAME on this server's origin (up to 10 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": {
"token": "<token>",
"name": "<name>"
},
"name": "put_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | http(s) URL for the browser to fetch. | |
| data | No | Base64 bytes, for small assets. | |
| name | Yes | Filename, including extension. | |
| token | Yes | The session token that connect returned. | |
| folder | No | Folder to put it in. Omit for the root. |