Skip to main content
Glama

Upload an image

upload_media

Upload an image, with alt text and a title per locale, into the "AI uploads" folder. Up to 3 MB. Locale codes must be ones the website has (see list_scopes). PNG and JPEG images are converted to WebP: the answer then gives convertedFrom with the type you sent. Returns the image's id, to use in image fields, with its address and text.

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": {
      "filename": "<filename>",
      "mimeType": "<mimeType>",
      "dataBase64": "<dataBase64>",
      "alt": "<alt>"
    },
    "name": "upload_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
altYesAlt text by locale code, such as {"de-DE": "…"}: what the image shows, for people who can't see it.
titleNoTitle by locale code, such as {"de-DE": "…"}.
filenameYesThe file name to show in the media library, such as lofoten-ridge.jpg.
mimeTypeYesThe image's type.
dataBase64YesThe image file, base64 encoded, at most 3 MB before encoding.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / alt / description
      Previous value: -"Alt text by locale code, such as {\"de-DE\": \"…\"}"New value: +"Alt text by locale code, such as {\"de-DE\": \"…\"}: what the image shows, for people who can't see it."
    • addedInput schema / properties / dataBase64 / description
      Added value: +"The image file, base64 encoded, at most 3 MB before encoding."
    • addedInput schema / properties / filename / description
      Added value: +"The file name to show in the media library, such as lofoten-ridge.jpg."
    • addedInput schema / properties / mimeType / description
      Added value: +"The image's type."
    • addedInput schema / properties / title / description
      Added value: +"Title by locale code, such as {\"de-DE\": \"…\"}."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare that this is a non-destructive write; the description adds the operational facts an agent actually needs: a 3 MB ceiling, that PNG and JPEG are transcoded to WebP, and that the response will echo convertedFrom with the original type. Because there is no output schema, spelling out the return payload (id, address, text) is genuinely load-bearing rather than redundant.

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 most decision-relevant facts — destination, size cap, locale constraint — are front-loaded in the first two sentences, and the conversion and return behavior follow logically. The prose is dense and slightly run-on in the final sentence, but no sentence is 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 5-parameter write tool with nested locale objects and no output schema, the description covers size limits, conversion side effects, locale validity, destination, and the return shape. An agent could call this correctly and interpret the response without consulting anything else except the referenced list_scopes.

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 earns more by adding meaning the schema does not: the per-locale maps must use locale codes the website actually supports, which the schema's '{"de-DE": "…"}' example never states. It does not explain how mimeType interacts with the conversion rule (e.g. whether GIF/AVIF pass through untouched), leaving one small gap.

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 description opens with a specific verb and resource ('Upload an image') and immediately scopes it with destination ('into the "AI uploads" folder') and payload ('alt text and a title per locale'). This distinguishes it from siblings like set_image_text (editing text after the fact) and discard_upload (removing an upload), so an agent can pick it without inspecting other schemas.

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

Usage Guidelines4/5

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

It gives a concrete precondition — locale codes must exist on the website, with a pointer to list_scopes — and states the downstream use case ('Returns the image's id, to use in image fields'). What it lacks is an explicit when-not or a named alternative for cases such as replacing an existing image, so guidance is clear but not exhaustive.

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