Skip to main content
Glama

media_upload_link

Creates a single-use link for uploading ONE media file into the media library. Call it when the user has a LOCAL file for a Riddle: this server cannot receive bytes, so the upload is yours. A link expires after 5 minutes, dies on first use (successful or not), and only 20 are handed out per account per 5 minutes - so create one immediately before each upload, a batch one file at a time rather than the links up front, and never store or share one. Check the file BEFORE minting a link, since a link a rejected file burns is gone: an image, a video or an audio file, at most 10 MB (some environments cap lower - "maxBytes" and "allowedTypes" in the answer are the authoritative pair). Pass the "project" you will build in. Returns {uploadUrl, expiresAt (UTC), singleUse, maxBytes, allowedTypes, project, usage, requiresNetworkAccessTo}. POST the file to "uploadUrl" as multipart/form-data under the field name "file" - "usage" is that command ready to run, e.g. curl -F 'file=@/path/to/image.png' '' (the link carries its own signature, so no API key or header). That POST leaves your environment and needs outbound HTTPS to the host in "requiresNetworkAccessTo" (allowlist the wildcard it gives; in Claude only an admin can change that organization setting). If it is blocked or does not resolve, tell the user which host to allow - do not retry or look for another way in. The POST answers with {mediaId, type, width, height, size, folderId, project}: "mediaId" is the ONLY handle - use it as "media": {"type": "Image", "mediaId": } in a block (riddle://reference/riddle-builder/block-types). Never guess a url for it: a CDN url passed as a plain "url" media is re-downloaded as a second, unrelated copy - the account pays twice and this file records no usage, which makes an image in a live Riddle look safe to delete. The file lands in the account's "AI Uploads" folder tagged "AI Upload", counts against their storage, and media_delete removes it again.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "media_upload_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectNoProject ID; NULL or omitted: your personal project (project API key: its project). A mediaId only resolves in its project - build in the same one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / project
      Added value: +{
      +  "default": null,
      +  "description": "Project ID; NULL or omitted: your personal project (project API key: its project). A mediaId only resolves in its project - build in the same one.",
      +  "type": [
      +    "null",
      +    "integer"
      +  ]
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say not-read-only, open-world, not-idempotent; the description adds the whole operational contract: 5-minute expiry, death on first use, 20-per-account-per-5-minutes rate limit, network allowlisting, and the file's eventual placement in the "AI Uploads" folder counting against storage. It also explains the download-twice failure mode and how media_delete reverses the effect, all consistent with the annotations.

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 purpose and the key constraint, and nearly every sentence carries operational information (the curl example, the mediaId-only warning). It is a dense single block that would scan faster as short bullets, which is the only thing keeping it off a 5.

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?

Even without an output schema, the description enumerates both response shapes ({uploadUrl, expiresAt, singleUse, maxBytes, allowedTypes, project, usage, requiresNetworkAccessTo} and {mediaId, type, width, height, size, folderId, project}) and the downstream usage of mediaId. Nothing an agent needs in order to call this safely 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?

The single "project" parameter already has 100% schema coverage, including the note that a mediaId only resolves in its own project. The description restates this ("Pass the project you will build in", "build in the same one") but adds no syntax, defaults, or edge cases beyond the schema, so baseline 3 is right.

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?

Specific verb and resource: "Creates a single-use link for uploading ONE media file into the media library." It also makes a scope distinction the sibling media_delete does not share, and the ONE/upload semantics are stated up front.

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?

Explicit when-to-use ("Call it when the user has a LOCAL file for a Riddle") and why-not alternatives ("this server cannot receive bytes, so the upload is yours"). It also gives ordering rules: check the file before minting, create one link immediately before each upload, batch one file at a time, and do not retry on network block.

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