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). Returns uploadPageUrl, a page the user opens to pick their photo; it resizes the image for the web and attaches it to the page itself, so no media_attach call is needed. The link expires (see expiresAt). page_get shows the photo once it has been uploaded.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pageId": "<pageId>"
    },
    "name": "media_upload_link_create"
  }
}

Input 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

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
Behavior5/5

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

Annotations only say it is non-read-only, non-destructive, non-idempotent, and closed-world; the description goes well beyond that by disclosing the return value (uploadPageUrl), that the user must open a page and pick a photo, that resizing and attachment happen server-side, that the link expires (expiresAt), and how to verify via page_get. That is exactly the behavioral context an agent needs before handing a URL to a user.

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?

Selection criterion is front-loaded in the first clause, then the call requirements, then the return behavior and follow-up verification. Dense but every sentence carries a distinct fact with 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?

Covers selection, required inputs, what the user does with the result, the expiry caveat, and the verification path — and does so without duplicating the output schema's field definitions. Nothing an agent needs to call this correctly or explain it to a user 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 coverage is 100%, so pageId, editToken, placement and altText are already documented, including the placement enum values. The description only restates the demo-page editToken condition and gives one example placement (header_photo); it adds no syntax or format detail beyond the schema, so the baseline of 3 applies.

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') and scopes it to images on the user's own device. It also distinguishes itself from media_attach by declaring that no attach call is needed, so an agent can select it without opening sibling schemas.

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 selection rule — 'the right tool whenever the image is not already at a public URL' — which implies the inverse case (public URL → use something else). It also names the follow-up tool (page_get) and rules out media_attach, covering both when and when-not.

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