Skip to main content
Glama

Upload media

upload_media

Imports media into the media library from a public HTTPS URL, or from base64 data up to 3 MiB decoded. Returns a media ID for use in posts. Media counts toward the storage quota until deleted. Redirects and private-network URLs are rejected.

Input Schema

NameRequiredDescriptionDefault
urlNo
base64NoRaw base64 without a data URI prefix, at most 3 MiB decoded. Not for conversation images.
filenameNoRequired for base64. Include the original extension.

Output Schema

NameRequiredDescriptionDefault
codeNoStable machine-readable error code. Present only for an error result.
dataNoA workspace media asset with temporary signed URLs.
errorsNoValidation messages keyed by input field.
issuesNoStructured validation issues.
messageNoSafe error summary. Present only for an error result.
retry_afterNoSeconds to wait before retrying a rate-limited request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnly=false, idempotent=false, destructive=false, openWorld=true), and the description adds real operational context beyond them: a 3 MiB decoded size ceiling, quota consumption until deletion, and rejection of redirects and private-network URLs. It stops short of stating auth/permission requirements or explaining idempotency behavior for repeat uploads.

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?

Four short sentences, zero filler, each carrying a distinct fact (input modes, size limit, return value, quota side effect, validation rejections). The most important framing information is front-loaded.

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?

An output schema exists, so the description need not detail return values, yet it still notes the returned media ID. Combined with annotation coverage of the safety profile, the description supplies enough to call the tool correctly, though permission/scope prerequisites remain unstated.

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?

With 67% schema coverage, the description usefully supplements the schema: it specifies that the URL must be public HTTPS with no redirects, and restates the 3 MiB decoded ceiling for base64. It does not independently clarify the filename parameter's role beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ('Imports media into the media library') and clarifies the two accepted input modes (public HTTPS URL or base64). It is clear about scope, but it never names or distinguishes itself from close siblings such as upload_media_file, create_media_upload_ticket, or open_media_uploader, so an agent must infer which upload path applies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is only implied: 'Returns a media ID for use in posts' and the base64 schema note 'Not for conversation images' hint at context, but there is no explicit when-to-use statement and no guidance on when to prefer a sibling upload tool. The tool has no required parameters, which makes the absence of routing guidance more consequential.

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