Upload image
upload_assetHost an image the user already has — a logo, product shot, screenshot or team photo — and get back a URL to use in the page. Real imagery of the user's own business converts better than anything generated, so prefer this whenever they can supply a file. Choose ONE transport: sourceUrl if the image is already on a public https URL (we fetch it); no argument at all to get a one-time upload URL to PUT the file to with curl (best when you have a shell and a file on disk); or base64 for a small file you can inline. Whatever arrives is resized to fit, converted to WebP and stored — including SVG, which is rasterised. The asset is attached to a page automatically when you publish a page that uses its URL.
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_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base64 | No | Image bytes, base64-encoded, for a small file only (max 2 MB decoded). Costs context — prefer sourceUrl, or the upload URL when you have a shell. | |
| filename | No | Original file name, kept for the user's reference. Optional. | |
| sourceUrl | No | Public https URL of an image to fetch and host. Use when the user gives you a link to their logo or photo. | |
| description | No | What the image shows, e.g. "Acme wordmark, dark on transparent". Stored filenames are short ids, so this is how you and the user tell assets apart later. Always worth setting. |