Skip to main content
Glama

create_reference

Create an upload slot for a reference image. Returns an upload URL and a ref_ token: upload the image file with one shell command (curl -T ''), then pass the ref_ token to the reference-image parameter you are filling - every parameter that takes reference images names this tool in its description. This is the ONLY way to supply reference images, and those parameters accept ref_ tokens and nothing else. Image data never goes inside a tool call: a call is JSON, so an embedded image would have to be base64 text that you, the caller, must emit character by character - slow, error-prone, and enough to exhaust your context window. The upload moves the bytes out-of-band instead: a plain HTTP PUT of the raw file, so any HTTP client works; if your environment has no way to send one, install curl. And when the image you want is from one of your OWN recent Logospell generations, skip the upload entirely: pass sourceGeneration and sourceImage and the server copies it directly (to grow an existing set, use its extend tool instead: extend_image_set, extend_character_set or extend_illustration_set). Accepts PNG, JPEG, or WebP, each at most 500KB, each side between 64px and 768px - resize before uploading if needed; larger reference images do not improve results. A reference is private to your API key and can be used in any number of later calls; it expires 7 days after its last use or re-upload (each use restarts the window), so uploading a few references once can serve a whole session of work. To update a reference, upload a new file to the same upload URL: its image is replaced and its ref_ token stays the same. Costs no credits.

Input Schema

NameRequiredDescriptionDefault
sourceImageNoOptional, with sourceGeneration: the delivered image filename to use as the reference, exactly as the generation's result or get_generations (the subjects, variations or scenes in promptJSON) lists it (e.g. "a_lotus_cradling_a_glowing_pearl.png"). An image larger than the reference limits is downscaled to fit automatically.
sourceGenerationNoOptional, with sourceImage: fill this reference from one of your own recent generations instead of uploading a file. Pass the generation id - the random segment of its download URL (.../download/<id>/images.zip), also returned by list_recent_generations. The image is copied server-side; nothing is uploaded.

Output Schema

NameRequiredDescriptionDefault
refYesToken to pass to a tool's reference-image parameter.
expiresAtYesWhen the reference expires if left unused, RFC3339.
uploadURLYesURL to PUT or POST the image file to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / sourceImage / description
      Previous value: -"Optional, with sourceGeneration: the delivered image filename to use as the reference, exactly as the generation's result, its manifest, or get_generations (the subjects in promptJSON) lists it (e.g. \"a_lotus_cradling_a_glowing_pearl.png\"). An image larger than the reference limits is downscaled to fit automatically."New value: +"Optional, with sourceGeneration: the delivered image filename to use as the reference, exactly as the generation's result or get_generations (the subjects, variations or scenes in promptJSON) lists it (e.g. \"a_lotus_cradling_a_glowing_pearl.png\"). An image larger than the reference limits is downscaled to fit automatically."
  2. Changed4 schema fields changed
    • changedInput schema / properties / sourceImage / description
      Previous value: -"Optional, with sourceGeneration: the delivered image filename to use as the reference, exactly as listed by list_recent_generations or the generation's manifest (e.g. \"a_lotus_cradling_a_glowing_pearl.png\"). An image larger than the reference limits is downscaled to fit automatically."New value: +"Optional, with sourceGeneration: the delivered image filename to use as the reference, exactly as the generation's result, its manifest, or get_generations (the subjects in promptJSON) lists it (e.g. \"a_lotus_cradling_a_glowing_pearl.png\"). An image larger than the reference limits is downscaled to fit automatically."
    • addedOutput schema / properties / expiresAt / description
      Added value: +"When the reference expires if left unused, RFC3339."
    • addedOutput schema / properties / ref / description
      Added value: +"Token to pass to a tool's reference-image parameter."
    • addedOutput schema / properties / uploadURL / description
      Added value: +"URL to PUT or POST the image file to."
  3. Added

TDQS

A4.8/5.0
Behavior5/5

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

Far beyond the annotations: it discloses the out-of-band curl PUT upload flow, why images cannot be embedded in the call (base64/context-window rationale), accepted formats and hard limits (PNG/JPEG/WebP, 500KB, 64-768px), the 7-day expiry with each use restarting the window, key-scoped privacy, the update-by-re-upload semantics that preserve the ref_ token, and that it costs no credits.

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 and the returned token, and nearly every sentence carries operational content. The base64/context-window explanation is slightly lecturing for a 2-parameter tool, but it preempts a costly caller mistake, so it largely earns its place.

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?

Although an output schema exists, the description still names the two returned values, and it covers everything else an agent needs: format/size constraints, the out-of-band transport requirement, the no-upload shortcut, lifecycle and expiry, and the update path. Nothing material is left to inference.

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, and the description adds value on top by framing the two optional parameters as a coupled server-side alternative ('skip the upload entirely: pass sourceGeneration and sourceImage') rather than independent options. It does not, however, add anything the schema descriptions don't already cover about filename/id formatting.

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 specific verb and resource ('Create an upload slot for a reference image') and immediately names the artifact it returns (upload URL + ref_ token). It also distinguishes itself from siblings by explicitly naming extend_image_set, extend_character_set and extend_illustration_set as the tools to use for a different job.

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 states exactly when to use it ('the ONLY way to supply reference images'), when to skip it entirely (own recent Logospell generation via sourceGeneration/sourceImage), and which alternative to reach for when growing an existing set. It even routes the agent to the specific extend tools by name.

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