Skip to main content
Glama

Get an upload URL for a large file

assets_upload_url

For an agent with a shell, on any server (this one reads no disk): opens a resumable upload for one video or audio file of up to 2GB and answers a session URL plus the exact curl that sends the file straight to storage. Run the curl, then call assets_upload_complete with the mediaKey; the key works in posts_create and edit_footage once complete answers. The URL writes only that one key, at exactly byteLength bytes, and expires within 7 days. Images and PDFs: fetch_asset from a public URL, or assets_upload on the local (stdio) server. Needs the write scope.

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>",
      "contentType": "<contentType>",
      "byteLength": "<byteLength>"
    },
    "name": "assets_upload_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesThe file's name, e.g. demo.mp4: letters, digits, dot, dash, underscore.
localPathNoOptional: the file's path on your machine, written into the curl so it runs as is.
byteLengthYesThe file's exact size in bytes (wc -c < file). Storage refuses any other size.
contentTypeYes

Output Schema

NameRequiredDescriptionDefault
curlYes
nextNo
mediaKeyYes
expiresAtNo
sessionUrlYes
statusCurlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false) by disclosing the scope requirement ('Needs the write scope'), the write footprint ('writes only that one key, at exactly byteLength bytes'), the 7-day expiry, and the resumable nature of the session. The only minor gap is that 'openWorldHint=false' alongside 'sends the file straight to storage' could confuse an agent about the external surface, though the target is presumably the service's own storage.

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?

Dense but front-loaded: the agent prerequisite comes first, then the action, then the follow-up workflow, then the exclusions. A couple of clauses are packed tightly (the mediaKey sentence chains assets_upload_complete, posts_create, and edit_footage), but no sentence is filler.

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?

Complete for a multi-step upload flow: it covers precondition, action, size limit, response contents, follow-up call, downstream consumers of the mediaKey, write/expiry constraints, and the alternatives for unsupported file types. The output schema covers return values, so the description does not need to enumerate them in more detail.

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

Parameters4/5

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

Schema coverage is 75% and the schema already documents filename, localPath, byteLength, and the contentType enum. The description reinforces the meaning that matters most: the URL writes 'exactly byteLength bytes', which ties the parameter to a storage-enforced constraint, and it frames contentType as 'one video or audio file', explaining why the enum is restricted to media types.

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: 'opens a resumable upload for one video or audio file of up to 2GB' and returns 'a session URL plus the exact curl'. It also distinguishes itself from siblings by naming assets_upload_complete, posts_create, edit_footage, fetch_asset, and assets_upload with their respective roles.

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 preconditions are front-loaded: 'For an agent with a shell, on any server (this one reads no disk)'. It gives the when-to-use context plus explicit alternatives for other file types ('Images and PDFs: fetch_asset from a public URL, or assets_upload on the local (stdio) server') and the required follow-up call.

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.