Skip to main content
Glama

Upload media

upload_media

Get somewhere to upload the user's own image, video or audio files, so they can be used as frames or references in generate_video / generate_image (which take public https URLs). With files: one presigned PUT URL per file (valid an hour) — PUT the bytes with exactly the declared Content-Type and length (e.g. curl -T file -H "Content-Type: …" ""), then use its url. Always also returns a POST endpoint and ticket (valid 30 minutes) for when the size is not known: POST the raw bytes with "Authorization: Bearer ", "Content-Type" and optionally "X-File-Name"; the answer's url is the file. Limits: images 20 MB, video 100 MB, audio 50 MB. Only for clients that can send local files (Codex, Claude Code, Cursor, scripts); a file already at a public https URL needs no upload. Never spends credits.

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": "upload_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Adds substantial behavior beyond the annotations: presigned PUT URL lifetime (one hour), a separate POST endpoint with a 30-minute bearer ticket for unknown sizes, required Content-Type/length matching, and per-type size caps (20/100/50 MB). It also notes no credits are spent, which the annotations do not convey. Not a 5 only because error/failure behavior (e.g. what happens on expired ticket or oversize file) is left implicit.

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 outcome and then the operational detail; nothing is filler. The mid-section curls and inline example are dense and slightly run-on, but every clause carries information an agent needs to perform the upload correctly.

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?

No output schema exists, so the description carries the return contract (putUrl, ticket, and the resulting `url`) and does so explicitly. Combined with limits, auth header format, and client eligibility, an agent has everything needed to call it correctly.

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

Parameters5/5

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

Despite 0% schema description coverage, the description fully explains the single `files` parameter: one presigned PUT URL per file, that the bytes must be sent with exactly the declared Content-Type and length, and that omitting `files` falls back to the ticket-based POST flow. This compensates completely for the undocumented schema.

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 concrete verb and resource — obtaining a destination to upload the user's own image/video/audio files — and ties the result to its consumers (generate_video / generate_image, which take public https URLs). That immediately distinguishes it from the sibling generation tools.

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 explicit when-to-use ('clients that can send local files: Codex, Claude Code, Cursor, scripts') and when-not ('a file already at a public https URL needs no upload'), plus the fallback path when size is unknown. Alternative and exclusion conditions are spelled out rather than inferred.

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.