Skip to main content
Glama

PostFlow

Upload media from URL

upload_media_from_url

Uploads a file from a publicly reachable URL. Supported extensions: jpg, jpeg, png, gif, webp, heic, avif, pdf, srt, mp4, mov, mpeg, webm, avi, mp3. Maximum size 5 GB. Returns media_id immediately while the file is downloaded and processed in the background. Poll get_media_upload_status until status is completed before using the media_id in create_post or update_post. For a local file without a public URL use init_media_upload instead.

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": {
      "file_url": "<file_url>"
    },
    "name": "upload_media_from_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_urlYesPublicly reachable URL of the file to upload.
file_nameNoFile name with extension, e.g. photo.jpg. Required when the URL path has no file extension.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare a non-destructive mutation. The description adds substantial behavioral context beyond that: asynchronous processing (returns media_id immediately, download happens in the background), a mandatory polling step before the media_id is usable, a 5 GB size limit, and a full list of supported extensions. This is exactly the operational detail an agent needs.

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?

Front-loaded with the core action, followed by constraints, the async workflow requirement, and the alternative-tool routing. The extension list is long but is genuinely load-bearing validation content; no sentence is redundant.

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?

With no output schema, the description still covers the return value (media_id), the async lifecycle gap (background processing), the required polling, the size/format limits, and the sibling alternative. Nothing an agent needs to call or sequence this tool correctly is missing.

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 100%, so the schema already documents file_url and file_name, establishing a baseline of 3. The description adds value beyond the schema by enumerating supported extensions and the maximum size, which are constraints on what file_url/file_name may contain and which the schema does not encode.

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 ('Uploads a file from a publicly reachable URL') and immediately distinguishes itself from the sibling init_media_upload ('For a local file without a public URL use init_media_upload instead'). An agent can distinguish this tool from complete_media_upload and init_media_upload without opening any schema.

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 names the alternative (init_media_upload) and the condition that selects it (local file without a public URL). It also prescribes the follow-up workflow: poll get_media_upload_status, then pass media_id to create_post/update_post. When-to-use, when-not, and next-steps are all present.

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