Skip to main content
Glama

Upload a reference image

upload_reference_image

Stage an image for generate_cover_from_reference (a cover the user likes, a mood board, their art) or a person photo for replace_person_on_cover. Free. Returns an upload_id.

  • A cover in this account: skip this tool; pass its coverId as reference_cover_ids.

  • Attached in the chat or on the user's device: call with no image argument, give the user the link, and wait until they say it is uploaded. Your sandbox cannot send an attachment.

  • At a public https URL: image_url.

  • With a shell and open network: add content_type to get a curl command. JPEG, PNG or WebP; 256-4096 px; up to 5 MB.

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_reference_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
image_urlNoAn https URL the server can fetch the image from. Must be a public host. Omit it to get an upload link for the user instead.
content_typeNoThe image's MIME type. Required with image_base64. With no image argument, it adds a curl command for an agent with a shell. Ignored with image_url.
image_base64NoOnly for an image under 256 KB (decoded), raw base64 with no data: prefix. You generate every character of it, so a larger image fails: use the upload link.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations only mark this as a non-destructive open-world non-idempotent write; the description adds the cost model ('Free'), the returned identifier, and the hard limits (JPEG/PNG/WebP, 256-4096 px, 5 MB). It also warns that the sandbox cannot send attachments and that the agent must wait for the user to confirm upload, which is real operational context the annotations cannot express. The remaining gap is that it doesn't say how long a staged upload persists or whether uploads can be reused across generations.

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?

Purpose, cost and return value come first, followed by a four-bullet routing list and a one-line constraint footer. Every sentence carries a decision or a limit; nothing is repeated from the schema or annotations.

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 three-optional-parameter staging tool with no output schema, the description covers the routing decision, the return contract (upload_id), the image limits, and the human-in-the-loop wait step. An agent has everything needed to choose a path and call 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?

Schema coverage is already 100%, so the baseline is 3; the description earns above that by mapping each argument to a situation rather than restating the schema – image_url for public hosts, no image argument for the link flow, content_type for the curl command. It stops short of adding syntax detail beyond what the schema fields already state.

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?

The opening sentence states a concrete verb and resource ('Stage an image') and names the exact downstream consumers (generate_cover_from_reference, replace_person_on_cover), plus the return value (upload_id). An agent can distinguish this from import_cover or generate_covers without opening any schema.

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?

It gives an explicit decision tree: skip the tool and pass coverId when the cover already lives in the account, call with no image argument for chat/device attachments, use image_url for public https hosts, and add content_type for shell agents. Each branch names the condition that selects it, including a when-not-to-call case.

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.

Resources