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.9/5.0
Behavior5/5

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

Beyond the annotations (which only indicate non-readonly, non-idempotent, non-destructive), the description reveals key behaviors: the server fetches imageUrl with no size limit, large base64 payloads are rejected by request-size limits, and successful uploads may or may not already display the image. This adds substantial real-world behavior context and contains no contradiction with annotations.

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?

The description is dense but every sentence earns its place: preferred mode, size constraint, safety rule, sibling routing, and follow-up action. It front-loads the core purpose and uses formatting (PREFERRED, ONLY, never) to draw attention to critical constraints.

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 an output schema exists and the input schema covers 100% of parameters, the description fills the remaining practical gaps: when to use which input mode, size limits, device-file routing, and the required attach step. Nothing an agent needs to call this tool 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. The description adds meaningful semantics on top by explaining the size-limit tradeoff between imageUrl and imageBase64, the 'never paste photo bytes' rule, and routing device files to a different tool. This goes beyond the schema's descriptions, though it doesn't add per-parameter detail for all eight parameters.

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 states a specific verb and resource ('Add an image to a page') and immediately differentiates from sibling tools by naming media_attach (placement) and media_upload_link_create (device files). An agent can tell exactly what this tool does without opening the 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?

The description gives explicit when-to-use guidance: PREFERRED for web images via imageUrl, imageBase64 only for very small inline images, and a direct instruction to use media_upload_link_create for device files. It also states the required follow-up call to media_attach, making the usage workflow unambiguous.

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