Skip to main content
Glama

Upload Media from Base64

upload_media_from_base64

Upload a file sent as a base64-encoded string, for files that are not available at a public URL. The file is stored exactly as received, without compression or resizing.

Max size: 20MB. Supports: JPEG, PNG, GIF, WebP, MP4, MOV, PDF. Returns a media ID that can be attached to a post.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesBase64-encoded file content
filenameYesFilename with extension (e.g. "photo.jpg")
mimeTypeYesMIME type of the file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, destructiveHint=false, and openWorldHint=false; the description goes well beyond them by disclosing a hard 20MB size limit, the exact set of accepted formats, the fact that the file is stored without compression or resizing, and that the result is a media ID attachable to a post. These are precisely the operational constraints an agent needs before attempting an upload.

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?

Three tight sentences, zero filler, and the ordering is sensible: what it does, the condition that selects it, then constraints and return value. Every sentence contributes information an agent can act on.

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 naming the return value ('a media ID that can be attached to a post'). Combined with size and format limits, nothing an agent needs to invoke this tool correctly is missing.

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% and all three parameters are documented there, including the mimeType enum. The description's format list ('JPEG, PNG, GIF, WebP, MP4, MOV, PDF') and mention of base64 content largely restate that enum and the 'data' parameter rather than adding new semantics. Baseline 3 applies when the schema carries the parameter detail.

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 sent as a base64-encoded string') and immediately scopes it against the sibling upload_media_from_url with the conditional 'for files that are not available at a public URL.' An agent can distinguish this from the URL-based upload sibling 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 Guidelines4/5

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

The usage condition is stated explicitly ('for files that are not available at a public URL'), which effectively routes the agent away from upload_media_from_url, and the supported-format list tells the agent whether this is even a valid path. It stops short of naming the alternative tool outright, so it is clear context rather than a full when/when-not/alternative statement.

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