Skip to main content
Glama

Upload image

upload_image

Upload an image to the site's media library. Returns a mediaId: write it as {{ '' | image_url: width: 800 }} (a URL) or {{ '' | image_url: width: 800 | image_tag: alt: '…' }} (an ; image_tag takes a URL, never a bare id). Web images: imageUrl. dataBase64 has a ~3MB cap and is costly in tokens. More: get_style_reference({ topic: "media" }).

Input Schema

NameRequiredDescriptionDefault
idNoSite id.
filenameNoFilename hint.
imageUrlNoPublic URL of the ORIGINAL full-size image — no ?w= / h= / q= resize params.
mimeTypeNoWith dataBase64 (default image/jpeg).
dataBase64NoBase64 of a real file's bytes, never base64 you write out (it arrives cut off). ~3MB cap; prefer imageUrl.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / dataBase64 / description
      Previous value: -"Base64 or data URL. Last resort: ~3MB cap."New value: +"Base64 of a real file's bytes, never base64 you write out (it arrives cut off). ~3MB cap; prefer imageUrl."
  2. Changed1 schema field changed
    • changedInput schema / properties / id / description
      Previous value: -"Site id. Pass it on every call."New value: +"Site id."
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare the write/open-world/non-idempotent profile, and the description adds genuinely new context beyond them: the mediaId return contract, the ~3MB base64 cap, the token cost, and the caveat that hand-written base64 arrives truncated. It stops short of stating side effects on the media library or whether a repeat upload duplicates an asset.

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?

Purpose is front-loaded in the first clause, followed by the return contract and the input preference. Dense and mostly waste-free, though the Liquid template fragments are compressed enough that an agent must parse them carefully to extract the actual rule.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description proactively explains the return value and how to use it, and it covers the base64-vs-URL tradeoff. The main remaining gap is the absence of any disambiguation from upload_file, the closest sibling for a 5-param write tool.

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 adds decision-level meaning the schema lacks: which input path to prefer (imageUrl over dataBase64 for web images) and the constraint that image_tag consumes a URL, never a bare id. This clarifies authoring practice rather than just restating field docs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Upload an image to the site's media library') and describes the return value (mediaId) plus how to consume it. However it never distinguishes itself from the sibling upload_file (generic file upload) or find_image, which an agent could easily confuse with it.

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

Usage Guidelines3/5

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

Offers real guidance on the imageUrl vs dataBase64 choice ('Web images: imageUrl', 3MB cap, costly in tokens) and points to get_style_reference for the media topic. But this is parameter-choice guidance, not tool-selection guidance: nothing says when to use upload_image rather than upload_file or find_image.

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