Skip to main content
Glama

Upload a photo or video

media_upload

Upload one picture or video to attach to drafts: PNG, JPEG, WebP or MP4, up to 10 MB. Answers its media id. A file that no draft uses is removed 24 hours after upload. Only for small files you already hold as base64: for a picture or video you made yourself, use media_upload_link, which is far quicker than writing the file out. Make a picture a JPEG: every network that takes pictures accepts JPEG, while Instagram refuses PNG and WebP (capabilities lists each network’s mediaTypes).

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": {
      "name": "<name>",
      "mimeType": "<mimeType>",
      "base64": "<base64>"
    },
    "name": "media_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
altNoWhat the picture shows, for people who cannot see it. Kept with the file.
nameYesThe file name, for the user’s own list.
base64YesThe file’s bytes in standard base64, with no data: prefix. Up to 10 MB of file.
brandIdNoThe brand this is for, by its id from brands_list. Needed when the login has more than one brand; with one brand it can be left out.
mimeTypeYesThe file’s real format. A file whose bytes do not match is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / brandId
      Added value: +{
      +  "description": "The brand this is for, by its id from brands_list. Needed when the login has more than one brand; with one brand it can be left out.",
      +  "maxLength": 80,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the generic safety profile (readOnly=false, destructive=false, openWorld=false). The description adds genuinely new behavior: the tool returns a media id, unused files are purged 24 hours after upload, mime bytes must match the declared type, and there is a 10 MB cap. Retention and return-value disclosure are exactly the kind of context annotations cannot convey.

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 with the action, constraints, and the sibling alternative; every sentence carries weight. The final sentence is long and packs two ideas (universal JPEG acceptance plus Instagram's refusal) into one breath, which slightly hurts scanability.

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?

There is no output schema, and the description compensates by stating the return value (the media id) and the retention rule for orphaned files. Formats, size limit, alternative tool, and format-selection advice are all covered, leaving nothing an agent needs to call this 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 already 100%, so the baseline is 3, but the description adds real decision-making meaning: choose JPEG because some networks refuse PNG/WebP, and it flags that capabilities exposes each network's accepted mediaTypes. It does not restate the alt/name/brandId semantics, which the schema already handles well.

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 one picture or video to attach to drafts") plus the accepted formats and size ceiling, and immediately distinguishes itself from media_upload_link by scope ("only for small files you already hold as base64"). An agent can tell this apart from media_upload_link and media_from_url 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?

Explicit when-to-use and when-not-to-use: only for small base64-held files, and route to media_upload_link for media you produced yourself, with a stated reason ("far quicker than writing the file out"). It also gives a format recommendation (prefer JPEG) and points at capabilities for per-network mediaTypes.

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.