Skip to main content
Glama

Upload media

mediaUpload

Upload a file to the workspace media library, either from a public URL (images, GIFs and short videos; videos up to 100 MB) or from base64 data (small files). Returns the new file's id, public url (usable as post media), storage path, type and size.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "mediaUpload"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPublic URL of an image, GIF or short video (videos up to 100 MB) to import; exclusive with base64
nameNoDisplay name in the media library
base64NoRaw base64 file data; exclusive with url
captionNoCaption stored with the file
fileNameNoFile name, e.g. my-image.png; required with base64
folderIdNoMedia library folder id; the root folder when omitted
mimeTypeNoMIME type of the base64 data, e.g. image/png; required with base64

Output Schema

NameRequiredDescriptionDefault
errorNo
outputNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations cover write/non-idempotent/open-world status, and the description adds real operational constraints beyond them: accepted media types, the 100 MB video ceiling, and the 'small files' caveat for base64. It does not mention permission requirements or whether an identical re-upload overwrites or duplicates, which is the notable remaining gap.

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?

Two dense sentences, front-loaded with the action and its two modes; nothing is padded. The trailing return-value list is largely redundant given an output schema exists, which keeps it just short of a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter, no-required-parameter write tool with a full schema and output schema, the description covers action, both input modes, constraints and return shape adequately. It omits the url/base64 mutual exclusivity and the fileName/mimeType requirement for base64, both of which live only in the schema.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description's format/size details for url and base64 largely restate what the schema already says ('videos up to 100 MB', 'exclusive with url'), so it adds little semantic value on top of the parameter documentation.

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 file to the workspace media library) and enumerates both supported input modes. An agent can immediately distinguish it from mediaBrowse, mediaDelete, mediaMove or mediaRename 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear selection rule between the two input paths — public URL for images/GIFs/short videos, base64 for small files — which is the main decision an agent faces here. It offers no explicit exclusions or pointers to sibling tools (e.g. mediaBrowse for finding existing files), so it stops short of full routing guidance.

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.