Upload media
upload_mediaImports media into the media library from a public HTTPS URL, or from base64 data up to 3 MiB decoded. Returns a media ID for use in posts. Media counts toward the storage quota until deleted. Redirects and private-network URLs are rejected.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| base64 | No | Raw base64 without a data URI prefix, at most 3 MiB decoded. Not for conversation images. | |
| filename | No | Required for base64. Include the original extension. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Stable machine-readable error code. Present only for an error result. | |
| data | No | A workspace media asset with temporary signed URLs. | |
| errors | No | Validation messages keyed by input field. | |
| issues | No | Structured validation issues. | |
| message | No | Safe error summary. Present only for an error result. | |
| retry_after | No | Seconds to wait before retrying a rate-limited request. |