Skip to main content
Glama

Upload an image

heystack_upload_image

Upload a PNG, JPEG, GIF or WebP image for a document and get its URL and a Markdown image line. Write. Use this before putting an image in Markdown. Inline data images and local paths are refused. Pass the file as base64 (about 3 MB of image through MCP; larger files use POST /api/images or the CLI, up to 4 MB) and a proof from signImage. The proof covers the exact bytes, uses the same Ed25519 key and 12-bit proof of work, and expires after 3 minutes. On success the result is {url, markdown}. Images are re-encoded as a still PNG or JPEG and checked against the content rules. Animated images are refused. 422 is a refusal, 503 means review is unavailable. Never send a private key. Requires MCP 2026-07-28. On older protocol versions this tool returns setup steps and writes nothing.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "imageBase64": "<imageBase64>",
      "proof": "<proof>"
    },
    "name": "heystack_upload_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
altNoAlt text used in the returned Markdown image line.
proofYesThe signed image proof returned by signImage.
imageBase64YesImage bytes as base64. About 3 MB of image at most through MCP.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -{}
    • addedInput schema / properties / alt
      Added value: +{
      +  "description": "Alt text used in the returned Markdown image line.",
      +  "maxLength": 200,
      +  "type": "string"
      +}
    • addedInput schema / properties / imageBase64
      Added value: +{
      +  "description": "Image bytes as base64. About 3 MB of image at most through MCP.",
      +  "maxLength": 4000000,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / proof
      Added value: +{
      +  "description": "The signed image proof returned by signImage.",
      +  "properties": {
      +    "documentId": {
      +      "description": "Document id when the image is for an existing document.",
      +      "type": "string"
      +    },
      +    "draftId": {
      +      "description": "Draft id for a document not published yet. Publish it with the same key.",
      +      "type": "string"
      +    },
      +    "kind": {
      +      "description": "Whether the signer is a human or an agent.",
      +      "enum": [
      +        "human",
      +        "agent"
      +      ],
      +      "type": "string"
      +    },
      +    "nonce": {
      +      "description": "Unique nonce.",
      +      "type": "string"
      +    },
      +    "publicKey": {
      +      "description": "Signer public key. Never a private key.",
      +      "type": "string"
      +    },
      +    "scope": {
      +      "const": "heystack-image-v1",
      +      "description": "Proof scope. Always heystack-image-v1.",
      +      "type": "string"
      +    },
      +    "sha256": {
      +      "description": "SHA-256 of the exact image bytes.",
      +      "type": "string"
      +    },
      +    "signature": {
      +      "description": "Signature from signImage over the exact bytes.",
      +      "type": "string"
      +    },
      +    "timestamp": {
      +      "description": "Unix time in milliseconds.",
      +      "maximum": 9007199254740991,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "version": {
      +      "const": 1,
      +      "description": "Proof version. Always 1.",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "version",
      +    "scope",
      +    "publicKey",
      +    "kind",
      +    "timestamp",
      +    "nonce",
      +    "sha256",
      +    "signature"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / required
      Added value: +[
      +  "imageBase64",
      +  "proof"
      +]
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare it is a non-destructive write; the description adds the real behavioral burden: a signImage proof covering the exact bytes with the same Ed25519 key and 12-bit proof of work, a 3-minute expiry, re-encoding to a still PNG/JPEG with content-rule checks, 422 as refusal, 503 as review-unavailable, and a protocol gate that returns setup steps and writes nothing on older MCP versions. None of this contradicts the annotations.

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?

Front-loaded with the action, formats, and return value before limits and failure modes, so an agent can stop reading early and still act correctly. It is dense and somewhat long, with modest redundancy against the schema (private key warning) and a trailing protocol-version sentence that interrupts the main flow.

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?

For a write tool with a nested proof object, no output schema, and a cross-tool dependency, the description covers the return value, the prerequisite signing step, size ceilings and their workaround, failure semantics, and version gating. Nothing an agent needs to call it correctly is missing.

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 adds genuinely new meaning: the proof must come from signImage, covers the exact bytes, and expires after 3 minutes, and it clarifies that the 4,000,000 maxLength corresponds to roughly 3 MB of image, not 4 MB of base64 text. It restates 'Never send a private key', which the schema already says, so it is not a full 5.

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?

Opens with a concrete verb and resource plus accepted formats and the return shape: 'Upload a PNG, JPEG, GIF or WebP image for a document and get its URL and a Markdown image line.' No sibling tool touches images, and the description makes the output ({url, markdown}) explicit, so an agent can select it unambiguously.

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

Usage Guidelines5/5

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

States the trigger ('Use this before putting an image in Markdown'), the exclusions ('Inline data images and local paths are refused', animated images refused), and the alternative path for oversized files (POST /api/images or the CLI, up to 4 MB). Explicit when-to-use, when-not, and alternatives are all present.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.