Skip to main content
Glama

video_assets_generate_presigned_url

Generates a list of pre-signed upload URLs for the assets required. This API is only necessary if you want to upload to Magic Hour's storage. Refer to the Input Files Guide for more details.

The response array will match the order of items in the request body.

Valid file extensions per asset type:

  • video: mp4, m4v, mov, webm

  • audio: mp3, wav, aac, flac, webm, weba, m4a, opus, ogg, oga, aiff, amr

  • image: png, jpg, jpeg, jfif, heic, heif, webp, avif, jp2, tiff, tif, bmp

  • gif: gif, webp, webm

Note: gif is only supported for face swap API video_file_path field.

Once you receive an upload URL, send a PUT request to upload the file directly.

Example:

curl -X PUT --data '@/path/to/file/video.mp4' \
  https://videos.magichour.ai/api-assets/id/video.mp4?<auth params from the API response>

MCP guidance:

  • This only creates presigned upload URLs. For local files, upload the raw bytes to each returned upload_url outside the generation call, then pass the matching file_path into the create tool.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesThe list of assets to upload. The response array will match the order of items in the request body.
contextNoExplain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as "a user", "the customer", or "an account". Example: "Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution."

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesThe list of upload URLs and file paths for the assets. The response array will match the order of items in the request body. Refer to the [Input Files Guide](https://docs.magichour.ai/integration/inputs-and-outputs) for more details.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the response array matches request order, that files must be PUT to the returned URL, and that extension support varies by asset type (including the gif/face-swap caveat). It does not cover auth/permission scope or expiry of the presigned URLs, which is the main remaining gap.

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 purpose followed by scoping, constraints, and workflow guidance, with clean headings and a concrete curl example. Slightly long and the extension table duplicates schema content, which costs a point but does not obscure the key information.

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?

An output schema exists, so return values need no explanation, and the description supplies the full end-to-end context an agent needs: why the URL exists, what extensions are legal, how to upload, and how the resulting file path feeds later create calls. Nothing material 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 description coverage is 100%, so the schema already documents both parameters. The description's per-type extension list largely restates what the schema's extension field says, adding only the ordering guarantee for the response array. Baseline 3 is appropriate.

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 and resource ('Generates a list of pre-signed upload URLs for the assets required') and immediately scopes the tool as only needed when uploading into Magic Hour's storage, separating it from the many *_create_* generation siblings that consume file paths rather than produce upload targets.

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?

Explicitly states when it is and is not needed ('only necessary if you want to upload to Magic Hour's storage'), and the MCP guidance tells the agent to prefer existing file paths or direct URLs and to fall back to the presigned flow when hotlinked URLs are unreliable. This routes the agent to alternatives with clear conditions.

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.