Skip to main content
Glama

Media Upload URL

get_media_upload_url

Agent-direct upload, no human step. 1: get_media_upload_url({ domain, filename, content_type, size_bytes? }) returns { asset_id, upload_url, public_url, expires_in }. 2: HTTP PUT the raw bytes to upload_url with a matching Content-Type. 3: finalize_media_upload({ asset_id, domain }). For bytes with no public URL, or too big for upload_media URL mode (e.g. video over 200 MB). If the PUT fails with a network error (sandboxed or proxied agent), use upload_media interactive mode instead. Allowed: images, mp4/webm/quicktime, pdf, mp3/wav. Max 20 MB images, 50 MB PDF, 1 GB video. URL expires after expires_in seconds.

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": {
      "domain": "<domain>",
      "filename": "<filename>",
      "content_type": "<content_type>"
    },
    "name": "get_media_upload_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNo
titleNo
domainYes
alt_textNo
filenameYes
size_bytesNo
content_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With only destructiveHint=false in the annotations, the description carries real behavioral weight: it discloses the required HTTP PUT step with a matching Content-Type, that finalization is a separate call, the accepted media types, the per-type size ceilings, and that the returned URL is time-limited by expires_in. The failure-mode routing to interactive mode is exactly the kind of context annotations cannot express.

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 key constraint (no human step), then a numbered three-step sequence, then eligibility limits. Every sentence carries information: no restatement of the name, no filler, and the inline object shapes mean the agent can act without opening the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a multi-step, stateful tool with no output schema, the description still previews the return object (asset_id, upload_url, public_url, expires_in) and spells out the follow-up steps, which is the critical information. The remaining gap is the undocumented optional parameters (kind, title, alt_text), which could change the asset's behavior but are never mentioned.

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 0%, so the description must compensate, and it only partially does: it shows the call shape for domain, filename, content_type and size_bytes and marks size_bytes optional, but never explains what domain refers to or what kind, title and alt_text do — three of seven parameters are unexplained in both schema and description. The described constraints (limits by content type) do add genuine meaning beyond bare parameter names.

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 first sentence names the action precisely ("Agent-direct upload, no human step") and the numbered flow makes clear this is the presign step of a three-call pipeline: get_media_upload_url → HTTP PUT → finalize_media_upload. It distinguishes itself from the sibling upload_media by calling out the cases where this tool is required (no public URL, too large for upload_media URL mode).

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 (bytes with no public URL, or too big for upload_media's URL mode, e.g. video over 200 MB) and an explicit failure path (if the PUT fails from a sandboxed/proxied agent, switch to upload_media interactive mode). The named alternative and the condition selecting it are both present, so nothing is left to inference.

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