upload_image
Upload an image from a local file, base64 data URI, or public HTTPS URL to Substack's CDN and get back a public hosted URL for use in drafts, Notes, or posts.
Instructions
Upload an image to Substack's CDN. Provide exactly one of image_base64 (a base64 data URI), image_path (a local file path) or image_url (a public HTTPS image to download first). Returns a hosted image URL that is publicly fetchable by anyone with the link (an unlisted asset — not attributed to you or added to your feed).
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 |
|---|---|---|---|
| image_url | No | HTTPS URL of a PNG, JPEG, GIF, WebP or AVIF image to download and upload. Sent without Substack cookies; private, loopback, link-local, metadata and reserved destinations are refused at connection time and on every redirect (at most 3). Limits: 5 MB and 15 seconds; the bytes must match the declared type. Not available on every deployment. Mutually exclusive with image_base64 and image_path. | |
| image_path | No | Absolute path to a local image file (e.g., "/Users/me/pic.png"). Read and encoded automatically; MIME type inferred from the extension. Mutually exclusive with image_base64 and image_url. | |
| image_base64 | No | Base64-encoded image with data URI prefix (e.g., "data:image/png;base64,..."). Mutually exclusive with image_path and image_url. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image_url | Yes |