Skip to main content
Glama

Upload media from a URL

upload_media_from_url

Downloads a public image (JPEG, PNG, WebP, GIF), video (MP4, MOV, WebM) or PDF into the workspace and returns a media id to put in create_post.media_ids. Media is per workspace and reusable across posts. Shager measures every video itself: width and height as displayed (a rotated phone video counts as portrait) and duration_ms come back in the response, and validate_post checks Reels, Shorts, Stories and TikTok length and shape rules with them (Shorts: vertical or square, up to 3 minutes; Instagram Reels 3 s–15 min; Stories up to 60 s). width, height and duration_ms are optional and only used when a file can't be measured; measured values win. A video that comes back with null width, height or duration_ms couldn't be measured: pass them and upload again before scheduling it. Private, local and credentialed URLs are refused. Size limit: 2 GB.

Input Schema

NameRequiredDescriptionDefault
urlYes
widthNoFallback only: used when the video can't be measured.
heightNoFallback only: used when the video can't be measured.
file_nameNo
duration_msNoFallback only: used when the video can't be measured.
workspace_idYesWorkspace id from list_workspaces
idempotency_keyNoAny unique string you choose (REST: the Idempotency-Key header works too). Retrying with the same key and body returns the first result instead of creating a second one. Kept 24 hours.

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?

Annotations declare openWorldHint=true, idempotentHint=false and destructiveHint=false but say nothing about constraints. The description adds what matters in practice: private/local/credentialed URLs are refused, a 2 GB size cap, per-workspace scoping and reuse, and the fact that null measurement fields mean the file must be re-uploaded with fallback values. That is real behavioral context beyond structured data.

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-loads purpose and return value, then layers constraints. The embedded platform limits (Shorts up to 3 min, Reels 3 s–15 min, Stories 60 s) are somewhat tangential to an upload tool, but they justify why duration_ms matters, so the length is defensible.

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, and the description compensates fully by describing what comes back (media id, measured width/height/duration_ms) and what a null means. Combined with format, size and URL-access constraints, 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.

Parameters4/5

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

Schema coverage is a solid 71%, with width/height/duration_ms already labelled 'Fallback only' in the schema. The description reinforces the precedence rule ('optional and only used when a file can't be measured; measured values win') and explains the null-measurement retry loop, which the schema does not. It leaves file_name and idempotency_key unmentioned in prose, so not a perfect score.

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 ('Downloads a public image... video... or PDF into the workspace'), lists supported formats, and names the downstream consumer: the returned media id goes into create_post.media_ids. That routing line distinguishes it from create_post, schedule_post and validate_post without needing the schema.

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?

Clearly frames the workflow (upload here, then pass the id to create_post, and validate_post applies length/shape rules), and gives explicit recovery guidance for unmeasured videos. It stops short of a true 'don't use this when…' rule or naming an alternative upload path, which is why it isn't a 5.

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