Skip to main content
Glama

Keep an image for a document

upload_image
Idempotent

Keeps an image whose bytes you have (one you made, or a small file you can read) and returns its link, to use as or CSS url() in render_pdf, render_template, open_in_editor and update_document — instead of a data: URI, so the document stays small when you read it back. You send the bytes as base64 text, so this is for small images (a logo, an icon: tens of KB); PNG, JPEG, GIF, WebP or AVIF, at most 10 MB. A picture the person has (their photo, their logo file): ask them to add it in the editor at the edit link — drag it onto the page — and read it back with get_document. An image at a public https address needs no upload: use that address. An SVG goes into the HTML as it is. The image lasts 30 days after a document using it last changed.

Input Schema

NameRequiredDescriptionDefault
image_base64YesThe image's bytes, base64 (a data: URI is taken too).

Output Schema

NameRequiredDescriptionDefault
urlYesThe image's link, for <img src>.
typeYes
bytesYes
widthYesPixels (0: not read from this format).
heightYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, it discloses the returned value (a link), supported formats, the 10 MB size ceiling, and 30-day retention tied to a document's last change. These are operational constraints and lifecycle details the annotations do not provide, and nothing conflicts with readOnly=false/openWorld=false/idempotent=true.

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?

The definition is front-loaded with what the tool does and why use it over a data: URI, then proceeds through size, alternatives, SVG, and retention. Each sentence carries a distinct, useful constraint or routing rule, with no filler.

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 one-parameter upload tool with an output schema, it covers the missing context an agent needs: link return, format and size limits, retention, and the main alternatives. Nothing needed to call it correctly is absent.

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 single parameter has 100% schema description coverage, so the baseline is 3. The description adds value by clarifying that the payload is base64 text for small images and by setting formats and a size limit; the schema itself covers the data: URI acceptance detail.

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 first sentence names a specific action (keeps/upload image bytes) and resource (image) and states the concrete result: a link for <img src> or CSS url() in named sibling tools. It also distinguishes itself from data: URIs and from public-URL or human-provided images, so an agent can separate it from the listed tools.

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 explicit use conditions ('bytes you have', 'small images') and alternatives: ask the person to add their image in the editor and use get_document, use a public https address directly, or inline SVG as HTML. The tool's role relative to render_pdf, render_template, open_in_editor, and update_document is explicit.

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