Skip to main content
Glama

Create Image Upload Link

media_upload_link_create

Get an upload link for a photo on the user's own device (phone/computer) — the right tool whenever the image is not already at a public URL. Pass pageId (+ editToken for demo pages) and the placement (e.g. header_photo). Then show the returned uploadPageUrl to the user as a clickable link and ask them to open it and pick their photo: the page resizes the image for the web automatically and attaches it to the page, so you do NOT call media_attach afterward. The link expires (see expiresAt). After the user says they've uploaded, call page_get to confirm the photo is on the page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYesThe pageId returned by page_create.
altTextNoMeaningful alt text for the image.
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.

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

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

Annotations declare the mutation/idempotency profile, and the description adds substantial behavior beyond them: the page resizes and attaches the image automatically, no media_attach call is needed, the link expires (expiresAt), and the agent must surface uploadPageUrl to the user as a clickable link and confirm via page_get. This is real operational context for an interactive flow.

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?

Front-loaded with the core action and the routing decision in the first sentence, followed by the call parameters and the user-facing follow-up. Slightly long due to the multi-step workflow, but nearly every clause carries actionable information.

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?

An output schema exists, so return-value details need not be described, yet the description still references uploadPageUrl and expiresAt to wire the agent's flow. Combined with the required/optional parameter handling and the follow-up page_get check, nothing needed to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so pageId, editToken, altText, and the placement enum are already fully documented. The description restates that pageId and editToken (for demo pages) plus placement should be passed, adding only a single example value (header_photo) beyond the schema. Baseline 3 is appropriate.

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+resource ('Get an upload link for a photo') with a precise scope: images on the user's own device rather than a public URL. Explicitly names the sibling media_attach and says not to use it here, so the agent can distinguish it from media_attach/media_upload 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?

Gives an explicit when-to-use condition ('the right tool whenever the image is not already at a public URL') and an explicit when-not/alternative ('you do NOT call media_attach afterward'). It also routes the post-upload verification step to page_get.

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