Skip to main content
Glama

Keep an image for a document

upload_image
Idempotent

Keeps an image and returns its link, to use as or CSS url() in render_pdf, render_template, open_in_editor and update_document — so the document stays small when you read it back. Give one of: image — a picture the person attached in the chat, as your client passes attached files to tools; image_base64 — bytes you have yourself (one you made, a small file you can read: base64 is text you write, so tens of KB). PNG, JPEG, HEIC, GIF, WebP or AVIF; a photo over 10 MB or in HEIC is brought to print size (4096 px on the long side). A picture the person attached that you can see but have no file of: ask_for_images gives them a link to upload it from their device. An image at a public https address needs no upload: the document uses that address. An SVG goes into the HTML as it is. The image lasts 30 days after a document using it last changed.

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

Input Schema

NameRequiredDescriptionDefault
imageNoA picture the person attached in the chat.
image_base64NoThe 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. Changed2 schema fields changed
    • addedInput schema / properties / image
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "A picture the person attached in the chat.",
      +  "properties": {
      +    "download_url": {
      +      "description": "A temporary https address of the file.",
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url",
      +    "file_id"
      +  ],
      +  "type": "object"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "image_base64"
      -]
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say readOnly=false, idempotent=true, destructive=false, so the description carries the real behavioral load: it discloses the return value (a link), size/format handling (over 10 MB or HEIC is resized to 4096 px), SVG passthrough, and the 30-day retention window tied to last document change. These are exactly the traits an agent needs and cannot get from 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?

The core action and return value are front-loaded and nearly every sentence carries information (formats, size cap, expiry, SVG). It is a single dense paragraph, though, with a couple of loose asides ('as your client passes attached files to tools', 'base64 is text you write') that could be trimmed or broken into lines.

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 two-input tool with an output schema and full annotation coverage, the description covers everything an agent needs: which input to supply, accepted formats, transformation behavior, retention, and the escape hatches (public URL, ask_for_images, SVG). Nothing material 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; the description still adds decision value by explaining what 'image' means in practice (the client's attached-file object) and when 'image_base64' is appropriate ('bytes you have yourself ... base64 is text you write, so tens of KB'). The size and format constraints are stated in prose rather than per-parameter, so it stops short of a 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?

States a specific verb and resource ('Keeps an image and returns its link') and immediately names the concrete downstream use cases (<img src>, CSS url() in render_pdf, render_template, open_in_editor, update_document). An agent can tell this apart from ask_for_images and the render tools 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?

Gives an explicit either/or for the two inputs ('Give one of: image ... image_base64 ...'), plus real when-not guidance: a public https address needs no upload, and a picture the agent can see but has no file of should be routed to ask_for_images instead. That is explicit routing to an alternative under a stated condition.

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.