Skip to main content
Glama

PageHub

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" (and in content when that is set, since src shadows content). 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. Pass it on every call.
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. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare non-readOnly, non-destructive, open-world and non-idempotent. The description goes beyond that by explaining the return value (mediaId), where it must be wired (Image `src` with type "cdn", also `content`), and a cost constraint (~3MB cap, token-expensive). It omits permissions/auth requirements, which is the remaining gap.

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?

Five short sentences, front-loaded with the action and return contract, then the wiring detail, then the input-mode caveats. Every sentence carries information an agent needs; no 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?

No output schema exists, yet the description fully explains what comes back (mediaId) and how to consume it, which is the highest-risk gap for an upload tool. Combined with the cap and cost caveats, an agent can call this correctly without further context.

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 would be 3, but the description adds cross-field meaning the schema does not: the src/content precedence rule, that `imageUrl` is for public original full-size images, and the practical cost/cap tradeoff for `dataBase64`. That is genuine added semantics over the schema text.

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 ("Upload an image to the site's media library") and immediately names the artifact it produces (mediaId). The resource is narrow enough to distinguish it from the sibling upload_file and from read-only find_image.

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 real routing guidance among input modes: `imageUrl` for web images, `dataBase64` as a last resort with a ~3MB cap and token-cost warning, plus a pointer to get_style_reference for media details. It does not, however, contrast this tool with the sibling upload_file, so the when-not guidance is incomplete.

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