Skip to main content
Glama

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

NameRequiredDescriptionDefault
image_urlNoHTTPS 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_pathNoAbsolute 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_base64NoBase64-encoded image with data URI prefix (e.g., "data:image/png;base64,..."). Mutually exclusive with image_path and image_url.

Output Schema

NameRequiredDescriptionDefault
image_urlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed3 schema fields changedv1.2.0
    • changedInput schema / properties / image_base64 / description
      Previous value: -"Base64-encoded image with data URI prefix (e.g., \"data:image/png;base64,...\"). Mutually exclusive with image_path."New value: +"Base64-encoded image with data URI prefix (e.g., \"data:image/png;base64,...\"). Mutually exclusive with image_path and image_url."
    • changedInput schema / properties / image_path / description
      Previous value: -"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."New value: +"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."
    • addedInput schema / properties / image_url
      Added value: +{
      +  "description": "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.",
      +  "maxLength": 2048,
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "image_url": {
      +      "format": "uri",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "image_url"
      +  ],
      +  "type": "object"
      +}
  4. Changed3 schema fields changedv0.6.0
    • changedInput schema / properties / image_base64 / description
      Previous value: -"Base64-encoded image with data URI prefix (e.g., \"data:image/png;base64,...\")"New value: +"Base64-encoded image with data URI prefix (e.g., \"data:image/png;base64,...\"). Mutually exclusive with image_path."
    • addedInput schema / properties / image_path
      Added value: +{
      +  "description": "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.",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "image_base64"
      -]
  5. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only flag it as a non-read-only open-world write; the description adds substantive context beyond them: the returned URL is publicly fetchable by anyone with the link and is unlisted, not attributed to the caller and not added to their feed. It omits error/failure behavior and any auth requirements, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, purpose first, then the selection rule, then the outcome and its visibility caveat. Nothing is redundant with the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists so return shape needn't be described, yet the definition still characterizes the returned URL's visibility semantics, which is exactly the extra an agent needs before calling a write tool that creates public assets.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description resolves a real ambiguity the schema leaves open: with zero required parameters, 'exactly one of' makes explicit that one source parameter must be supplied while the schema only says they are mutually exclusive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Upload an image to Substack's CDN.' No sibling among the listed tools performs image hosting, so the operation is unambiguously distinct.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives the key invocation rule — 'Provide exactly one of image_base64, image_path or image_url' — which tells the agent how to pick among the input modes. It does not spell out when an agent should prefer this over other content-creation flows (e.g. before create_draft), but no direct alternative exists among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.