Skip to main content
Glama

upload_media

Upload a SMALL image/video inline and get a hosted public URL for schedule_post mediaUrls. Only practical for tiny files: it carries the whole file as base64 in the request, which is ~1.35x the byte size. For ANY real photo or video (anything over ~100KB) use prepare_media_upload + finalize_media_upload instead, that flow streams the bytes straight to storage and does not force a huge payload through this call. Instagram and TikTok REQUIRE hosted media (they cannot take a text-only post). Note: once a post using the media publishes, the file is auto-deleted 30 days later. CAPABILITY: draft: creates content that cannot reach an audience on its own. Safe for a draft-only agent token.

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>",
      "dataBase64": "<dataBase64>"
    },
    "name": "upload_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesOriginal filename incl. extension, e.g. "day01.mp4", the extension is preserved on the stored object.
dataBase64YesThe file bytes, base64-encoded (no data: URI prefix).
contentTypeYesMIME type, e.g. image/png or video/mp4.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare it is not read-only, not idempotent, and not destructive; the description goes further with payload inflation (~1.35x byte size), a retention rule (file auto-deleted 30 days after publish), and a capability statement ('draft': creates content that cannot reach an audience on its own, safe for a draft-only token). The only gap is that the immediate return shape and failure modes for oversized payloads are not described.

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?

The size constraint and the alternative flow are front-loaded, and every sentence carries decision-relevant content. There is minor redundancy in restating the oversized-payload problem twice ('carries the whole file as base64' and 'does not force a huge payload through this call'), but nothing is wasted overall.

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?

For a 3-parameter upload tool with no output schema, the description covers the decision criteria, the alternative path, platform requirements, data retention, and the capability/safety profile. An agent has everything needed to choose this tool or reject 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 100%, so the baseline is 3, but the description adds genuine meaning about dataBase64 by explaining it carries the entire file inline at roughly 1.35x the raw byte size, which is the operational fact that drives the size cutoff. filename and contentType are left entirely to the schema, which is acceptable given full coverage.

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 ('Upload a SMALL image/video inline and get a hosted public URL') and ties the result directly to the consuming field ('schedule_post mediaUrls'). It also distinguishes itself from the sibling streaming flow by name, so an agent can separate the two without opening either 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?

Gives an explicit quantitative cutoff ('anything over ~100KB') and names the exact alternative tools to use past it (prepare_media_upload + finalize_media_upload), with the reason why. It even notes the platform constraint that Instagram/TikTok require hosted media, closing the 'can I skip this?' question.

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.