Upload an image
upload_imageOpen the image upload widget for letters or postcards only as a fallback when a direct file attachment is unavailable or was not passed through to a preview tool. Do not use this when a generated imageUrl, hosted imageUrl, or working file attachment is already available. Do not use this just because the user referenced an image generated earlier in the same conversation. Reuse that existing conversation image first. Only open this widget after an actual failed handoff or when the user explicitly needs upload help. The widget uploads the file and returns an imageUrl to use in the next preview call.
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_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | No | What the photo is for: 'postcard', 'header_image' or 'inline_image'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| context | Yes | ||
| message | Yes | ||
| maxSizeMB | Yes | ||
| debugEnabled | Yes | ||
| debugEndpoint | No | ||
| acceptedFormats | Yes | ||
| cardUploadAvailable | No |