Skip to main content
Glama

Upload image

upload_image

Upload an image to the site's media library. Returns a mediaId, which goes in an Image's src with type "cdn" (never content, which is deprecated). Web images: imageUrl. dataBase64 has a ~3MB cap and is costly in tokens. More: get_style_reference({ topic: "media" }).

Input Schema

TableJSON 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 or data URL. Last resort: ~3MB cap.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / id / description
      Previous value: -"Site id. Pass it on every call."New value: +"Site id."
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare the write (readOnlyHint=false), non-idempotent, non-destructive, open-world profile. The description adds real value beyond that: the exact downstream consumption rule for the returned mediaId (src with type "cdn", never the deprecated "content"), and cost/size warnings for dataBase64.

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?

Front-loads the purpose in the first clause, then layers return-value usage, source selection, and a pointer to further docs. Dense but every sentence carries a distinct instruction with no filler.

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 correctly documents the return value (mediaId) and how to consume it, plus size/cost constraints. Complete enough for a 5-param, 0-required upload tool; minor omission is that nothing states required permissions or that no parameters are mandatory.

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 genuinely enriches semantics by clarifying the imageUrl-vs-dataBase64 tradeoff and the token/size cost of base64. It does not add detail on id/filename/mimeType, so it is above baseline but not exhaustive.

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 names the return value (mediaId). It is clearly an image-upload tool distinguishable from upload_file by resource type, though it never explicitly contrasts with that sibling.

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?

Gives actionable context: use `imageUrl` for web images, reserve `dataBase64` as a last resort due to its ~3MB cap and token cost, and points to get_style_reference({ topic: "media" }) for more. No explicit when-not or hard exclusions, but the selection guidance between the two source params is clear.

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