Skip to main content
Glama

Upload a small file inline

upload_media_data

Fallback for clients that cannot make network calls: uploads a small image, video or audio file sent inline as base64 (3 MB on the hosted server), checks it, and returns a long-lived asset_url plus its media type, size, dimensions and duration. A larger file returns code upload_too_large_inline with max_bytes; use create_upload_url for it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
data_base64YesThe file encoded as base64 (a data: URL prefix is accepted).
content_typeNoOptional declared type. The real type is read from the file itself and must match.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false; the description goes well beyond them by disclosing the effective size cap (3 MB, server-dependent), the fact that the file is validated ('checks it'), and the exact overflow error code plus escalation path. It stops short of stating auth requirements or that repeated calls are non-idempotent (each returns a new asset_url), which would be the remaining useful disclosures.

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?

Two sentences, both fully loaded: the first front-loads the fallback role, size limit, validation, and return payload; the second handles the overflow case. No filler or restatement of the title.

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 enumerating the return payload (asset_url, media type, size, dimensions, duration) as well as the failure mode and its successor tool. For a two-parameter, non-open-world upload tool, nothing an agent needs to call it correctly is missing.

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. The description adds meaning the schema cannot: the effective 3 MB server limit, which is far tighter than the schema's 45,000,000-character maxLength and is the value an agent actually needs to self-screen payloads. It adds nothing for content_type, which the schema already documents fully.

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 file inline as base64) plus the scope constraint ('small', with the concrete 3 MB figure). It explicitly distinguishes itself from the sibling create_upload_url, so an agent can route 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?

Names the exact precondition for use ('Fallback for clients that cannot make network calls') and the alternative for the other case ('A larger file ... use create_upload_url for it'). It even supplies the discriminating error code (upload_too_large_inline) and field (max_bytes), leaving nothing to inference.

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