Skip to main content
Glama

Upload Page Image

media_upload

Add an image to a page. PREFERRED for any image already on the web: pass its imageUrl and the server fetches it directly (no size limit, no attachment needed in chat). imageBase64 is ONLY for very small inline images — large base64 payloads are rejected by request-size limits and waste context, so never paste a photo's bytes; for a file on the user's device use media_upload_link_create instead. After a successful upload, call media_attach to place it (unless this returned content already showing it).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYesThe pageId returned by page_create.
altTextNoMeaningful alt text for the image.
fileNameNoOriginal file name when known.
imageUrlNoPublic direct image URL. The server validates redirects and blocks private network targets.
editTokenNoRequired for anonymous demo pages. Use the editToken returned by page_create.
placementNoWhere the image should be used. header_photo = business-card top photo, avatar = profile header avatar, block_image = image inside a block (requires blockId), gallery_item = appended to a gallery block, background = page background.
contentTypeNoDeclared MIME type, such as image/png. The server still verifies magic bytes.
imageBase64NoBase64 image bytes or a data:image/*;base64 data URI. Use only for small images.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
urlNo
pageIdNo
statusYes
altTextYes
contentNo
attachedNo
nextStepNo
variantsNo
deletedAtNo
expiresAtNo
placementYes
revisionIdNo
uploadedAtNo
mediaAssetIdYes
uploadPageUrlNo
revisionVersionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior4/5

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

Annotations declare write/non-idempotent/open-world but say nothing about limits or side effects; the description fills that gap by disclosing that the server fetches imageUrl directly with no size limit, that base64 payloads are rejected by request-size limits, and that a follow-up attach call is normally required. It does not restate auth/permission needs beyond the editToken already covered by the schema, so 4 rather than 5.

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-loaded with the action, then the parameter preference, the anti-pattern warning, the alternative tool, and the follow-up step — no sentence is filler and nothing is repeated from the schema or annotations.

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?

With an output schema present, return values need no explanation; the description covers what matters for correct invocation: source-parameter choice, size constraints, the alternative tool for device files, and the required attach follow-up. Nothing an agent needs to call this correctly is missing.

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 goes further by explaining the trade-off between imageUrl and imageBase64 (server-side fetch vs. size-limited inline bytes) — meaning that the schema's one-line field descriptions do not convey. That preference logic directly shapes which parameter an agent picks.

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+resource ('Add an image to a page') and immediately differentiates this tool from siblings by naming media_upload_link_create as the alternative for device files and media_attach as the follow-up step. An agent can place this among the media_* family without opening a schema.

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

Usage Guidelines5/5

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

It states explicit routing rules: imageUrl is PREFERRED for web-hosted images, imageBase64 is ONLY for very small inline images, and device files go to media_upload_link_create. It also prescribes the post-upload step (call media_attach unless content already shows the image), which is exactly the when-to-use guidance an agent needs.

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