Skip to main content
Glama

Import media

import_media

Add an image, video or audio file to the account's media library, so assemble_video and edit_asset can use it: a file the user attached in this conversation (file, where the client passes attachments), a public https link to the file itself (url), or a local file uploaded through create_upload_url (url set to its mediaUrl). Returns the library url. Putting an attached logo in the corner of a video or a picture is this, then edit_asset on the video or picture with an overlay operation whose inputs.image is the returned url and whose config.position names the corner (a picture comes back a PNG). Images up to 25 MB, audio 100 MB, video 200 MB; the type is read from the file, and anything else (SVG, PDF, a web page) is refused. When the user attached a file you cannot pass on (you see it but have no file or link to give), ask them to drop it into their Treza library at https://www.trezalabs.com/chat/assets and find it with list_assets. Needs the pipelines:write scope. Spends no credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoA public https link to an image, video or audio file, when there is no attachment. Pass file or url, not both.
fileNoA file the user attached in this conversation.
nameNoWhat to call it in the library, e.g. "Logo"; list_assets query matches it. Defaults to the file name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

The description adds behavioral details beyond annotations: size limits per media type, type detection and refusal of others, return of library URL, required pipelines:write scope, and zero credit cost. It also covers the edge case of an unpassable attachment. No contradiction with annotations.

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?

The description is dense but well-structured, front-loading the purpose and then systematically covering input modes, example, limits, fallback, scope, and credits. Each sentence contributes necessary information, though it is on the longer side.

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?

For a tool with no output schema, it fully explains the return value, error conditions, and usage contexts. It covers all three input methods, size constraints, the scope requirement, and credit implications. Nothing an agent needs 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 baseline is 3. The description adds value by explaining the relationship between url and file (mutually exclusive), and that url can come from create_upload_url's mediaUrl. It also clarifies name default. This goes beyond the schema's individual field descriptions.

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?

The description states a specific verb and resource: 'Add an image, video or audio file to the account's media library.' It clearly differentiates from siblings by stating its purpose is for assemble_video and edit_asset to use, and it mentions it refuses non-media types, distinguishing from other import tools.

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 explicitly describes three input modes and when to use each: file for attached, url for public link, and url set to mediaUrl for local upload via create_upload_url. It also provides a fallback when the user attaches a file that can't be passed on, directing to Treza library and list_assets. It clearly says 'Pass file or url, not both.'

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.