Skip to main content
Glama

Add media from a URL

put_media

Adds a file to the library as a new item; nothing existing is replaced. With url, the user's browser fetches it, so only public https hosts that send CORS headers work. data takes base64 bytes and is limited to about 700 KB, for small generated assets. Larger files on the caller's disk can be sent as an HTTP POST of the raw bytes to /media/upload?token=TOKEN&name=NAME on this server's origin (up to 10 MB).

Input Schema

NameRequiredDescriptionDefault
urlNohttp(s) URL for the browser to fetch.
dataNoBase64 bytes, for small assets.
nameYesFilename, including extension.
tokenYesThe session token that connect returned.
folderNoFolder to put it in. Omit for the root.

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 already declare non-destructive, open-world, non-idempotent behavior, and the description goes well beyond them: browser-fetch semantics, CORS requirements, the ~700 KB and 10 MB ceilings, and the exact upload endpoint with token/name query params. These are real operational constraints an agent cannot infer from the schema.

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 dense sentences with the non-destructive guarantee front-loaded, then each input mode with its constraint. No sentence is filler; the size limits and CORS caveat are exactly what prevents failed calls.

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?

With no output schema, the description never says what a successful add returns (e.g., the new media id), which an agent would want. Everything else an agent needs to choose an input path and call correctly is present.

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, but the description adds genuine meaning: `url` requires public https and CORS, and `data` carries a ~700 KB size cap. `folder`, `name`, and `token` are left to the schema, which is acceptable given full coverage.

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?

States a specific verb and resource: 'Adds a file to the library as a new item; nothing existing is replaced.' This clearly separates it from delete_media and organize_media. It doesn't explicitly name a sibling alternative, but the non-replacement clause distinguishes it from any update path.

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?

It gives explicit routing rules: use `url` for public https hosts with CORS headers, `data` for small base64 assets under ~700 KB, and the raw POST to /media/upload for larger files up to 10 MB. Each branch is conditioned on a concrete, checkable property of the caller's situation.

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