Skip to main content
Glama

upload_image

Upload an image to Substack's CDN using a base64 string, local file, or public URL, and receive a hosted image URL ready for 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).

Input Schema

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
image_urlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. 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"
      +}
  3. 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"
      -]
  4. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only set flags (readOnlyHint=false, destructiveHint=false, openWorldHint=true). The description adds substantial behavioral context: the hosted URL is 'publicly fetchable by anyone with the link' and 'an unlisted asset — not attributed to you or added to your feed'. It also discloses important security details for `image_url` (sent without cookies, refusal of private/loopback destinations, redirect limit of 3). This goes well beyond what annotations provide.

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

Conciseness4/5

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

The description is compact but information-dense. The main action and the 'exactly one' rule appear in the first sentence, followed by necessary clarifications in parentheses. No fluff, but the parenthetical about `image_url` security is a slight digression; still, it's essential context. Overall well-structured.

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?

The tool has three mutually exclusive parameters, security constraints, and an output schema (which describes the return value). The description covers the input requirements, behavior, and return (hosted URL) sufficiently. There is no missing information that would prevent an agent from invoking it correctly.

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?

The schema already describes each parameter at 100% coverage. The description reinforces mutual exclusivity and adds practical constraints for `image_url` (5 MB, 15 seconds, type matching) and for `image_path` (MIME inferred from extension). This adds value beyond the schema without redundancy.

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?

Description states a specific verb ('Upload') and resource ('image to Substack's CDN'), which is clear and distinct from all sibling tools (export, get, list, create, etc.). No ambiguity about what this tool accomplishes.

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?

The description explicitly mandates 'Provide exactly one of' the three input modes, which is a clear usage rule. It also notes that `image_url` is 'Not available on every deployment' and includes mutual-exclusivity language. However, it does not explicitly state when to prefer this tool over alternatives, though no sibling upload tool exists, so that gap is minor.

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