Skip to main content
Glama

Upload an image file

upload_image

Upload an image file you hold, sent as base64, with its licence, credit and source (the editor’s “upload a file”), stored as a new image — a lossless WebP at the file’s full resolution with its colour profile kept and every other metadata (EXIF, XMP, IPTC) dropped: at most 70 MB of file (its base64 is a third larger: up to 94 MB, which the site takes whole). POST /api/media (multipart, with this key) takes a file of the same 70 MB. The image is public at /img/w/…/ once stored, before any review — unless you set hold: true, which stores it held for a proposal: /img serves it only to you and to reviewers (never cached), it is in no list, and only your own proposal may name it, until a reviewer approves that proposal and releases it. A rejected or withdrawn proposal leaves it held, never deleted. The real run answers its mediaId: pass it to propose_entry_change as image_media_id to propose it for an entry. Audited, with the file name. Dry run by default; every run needs confirm_rights: true.

Input Schema

NameRequiredDescriptionDefault
holdNotrue: store it held, for a proposal (see above). Pass the mediaId to propose_entry_change as image_media_id.
creditNoWhom to credit, as shown beside the image — the author or rights holder. Needed by the licences that say so.
sourceNoWhere you found the image (a web page), kept for a rights question; never shown publicly.
contentYesThe file’s bytes in base64 (standard or URL-safe alphabet, no line breaks, no data: prefix). Any image sharp reads (PNG, JPEG, WebP, GIF, AVIF, TIFF, SVG); it is stored as a lossless WebP at its full resolution, its colour profile kept, every other metadata dropped.
dry_runNotrue (the default): write nothing — show the change and the exact request it would send. false: make the change.
licenseYesHow the image may be reused: "cc0-1.0" (CC0 1.0), "public-domain" (Public domain), "cc-by-4.0" (CC BY 4.0, needs a credit), "cc-by-sa-4.0" (CC BY-SA 4.0, needs a credit), "supplied" (Supplied by the subject, needs a credit), "permission" (Used with permission, needs a credit), "none" (No licence, only with the upload-unlicensed permission).
filenameYesThe file’s name. Kept in the audit log for a rights question, never shown publicly or used to store it.
confirm_rightsYestrue: you confirm the image may be published under this licence.

Output Schema

NameRequiredDescriptionDefault
noteNoA dry run: what to do next to make the change, in words.
resultNoA real run: the route’s own answer, where the tool adds facts of its own beside it.
confirmNoA dry run of a change that needs it: the exact target to send back as `confirm` with dry_run: false.
dry_runNotrue: a dry run, which wrote nothing. Absent from a real run.
replayedNoA real run with an idempotency_key already used for this change: the first call’s answer, given back; nothing was written now.
would_sendNoA dry run: the exact request the real run would send (`method`, `path`, any `headers` such as an Idempotency-Key, and its `body`, `form` or `query`), or the requests, in order.
may_edit_liveNoA dry run of a live edit: whether this key’s account may edit this entry live.
refused_becauseNoA dry run the real run would be refused for: why, in words.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / content / description
      Previous value: -"The file’s bytes in base64 (standard or URL-safe alphabet, no line breaks, no data: prefix). Any image sharp reads (PNG, JPEG, WebP, GIF, AVIF, TIFF, SVG); it is re-encoded to WebP."New value: +"The file’s bytes in base64 (standard or URL-safe alphabet, no line breaks, no data: prefix). Any image sharp reads (PNG, JPEG, WebP, GIF, AVIF, TIFF, SVG); it is stored as a lossless WebP at its full resolution, its colour profile kept, every other metadata dropped."
  2. Changed1 schema field changed
    • changedInput schema / properties / content / maxLength
      Previous value: -13981016New value: +97867096
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

This description is extremely rich regarding behavioral traits beyond the structured data. It explains critical technical constraints like 70MB limits, WebP conversion, metadata stripping, and the entire storage lifecycle (public vs. held vs. rejected). It also explicitly details the dry-run mechanism and the necessary downstream use of the resulting mediaId.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The tool is dense and extremely verbose, reading more like a technical specification document than an easy-to-parse tool definition. While it contains no fluff, its lack of structure makes it difficult for an agent to quickly extract decision points.

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?

Given the high complexity and the amount of technical and workflow information involved (conversion, size limits, URL generation, proposal handling), the description is complete. It addresses all necessary behavioral and functional concerns.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

While the input schema is 100% covered, the description provides crucial semantic context that deepens the meaning of the parameters. It clarifies the `content` format (no line breaks, no data: prefix), and explains the operational necessity and lifecycle impact of `hold`, `dry_run`, and `confirm_rights`.

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 is highly specific, detailing that the tool uploads a local image file provided in base64 format. It distinguishes this purpose by describing the resulting storage format (lossless WebP) and contrasts its function implicitly with other potential upload methods, such as `upload_image_from_url`.

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 clearly defines the context for using this tool: uploading a file from the user's local environment (sent as base64). It provides critical conditional logic by explaining the difference between a standard public upload and setting `hold: true` for proposal review.

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.