Skip to main content
Glama

Create Media Upload URL (large files)

create_media_upload_url

Step 1 of uploading a video or image you hold (up to 200MB video / 25MB image) into the user's oriiion account — no API key and no browser needed. Returns a presigned PUT: send the raw file bytes (not multipart, not base64) to upload.url with exactly upload.headers, before upload.expiresAt (30 minutes), body at most sizeBytes. Then call finalize_media_upload with the mediaId. Allowed contentType: video/mp4, video/quicktime, video/webm, image/jpeg, image/png, image/webp, image/gif. Output: { mediaId, status: 'pending', upload: { method: 'PUT', url, headers, expiresAt, maxBytes }, kind, contentType, filename }.

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": {
      "filename": "<filename>",
      "sizeBytes": "<sizeBytes>",
      "contentType": "<contentType>"
    },
    "name": "create_media_upload_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesOriginal filename, e.g. 'launch.mp4'. The stored extension always follows contentType.
sizeBytesYesExact file size in bytes; the upload is refused if the body is larger
contentTypeYesMIME type of the file: video/mp4, video/quicktime, video/webm, image/jpeg, image/png, image/webp, image/gif

Output Schema

NameRequiredDescriptionDefault
kindYes
statusYes
uploadYes
mediaIdYes
filenameYes
contentTypeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Well beyond what the annotations convey: it discloses the transport contract (raw bytes, not multipart, not base64, exactly upload.headers), a 30-minute expiry, that the body size is enforced against sizeBytes, an allow-list of content types, and the pending status. For a non-idempotent two-phase write, that is exactly the operational context an agent needs to avoid a malformed PUT.

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?

A single dense paragraph, front-loaded with the purpose and step number before the mechanics, then the allowed types and the named return fields. Every clause is operational (bytes format, headers, expiry, size enforcement); nothing is padding.

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?

Because an output schema exists, restating the return object is redundant, though the explicit handoff to finalize_media_upload compensates. The one real gap is what happens on a duplicate call: with idempotentHint=false, the description should warn that a second call creates a separate pending upload that must also be finalized or left dangling.

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%, with filename, sizeBytes and contentType all documented including the 200MB ceiling and the enum-like list of MIME types. The description largely restates those constraints and adds only the note that the PUT body must match sizeBytes exactly, so it sits at the baseline rather than adding new semantic depth.

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?

Names a specific verb and artifact: it creates a presigned upload URL as 'Step 1' of a two-step media ingest, with explicit size limits (200MB video / 25MB image). That framing cleanly separates it from finalize_media_upload (step 2), import_media_from_url (source is a URL, not local bytes) and create_upload_link.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear trigger ('uploading a video or image you hold... no API key and no browser needed') and an explicit next step ('Then call finalize_media_upload with the mediaId'). It does not explicitly name the alternatives (import_media_from_url, upload_file, create_upload_link) or state when not to use it, so routing to a sibling for URL-hosted files 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