Skip to main content
Glama

upload_media

Upload a local file or copy a remote URL to Pixio, returning a permanent public media URL for use with AI model media parameters.

Instructions

Upload a local file or mirror a remote URL to Pixio, returning a permanent public media URL.

Use this before generate whenever a model parameter needs media (image_url, video_url, audio_url, ...): generate accepts http(s) URLs only and rejects local filesystem paths. The returned url (hosted on pixiomedia.nyc3.digitaloceanspaces.com) is permanent and publicly readable, and is exactly what generate's media params (e.g. image_url) expect — pass it through verbatim.

Args: source: An http(s) URL (mirrored server-side into Pixio storage) or a local file path (~ is expanded; uploaded as multipart). Directories are rejected.

Returns: {"url": str, "source_kind": "local_file" | "remote_url", "file_name": str, "size_bytes": int | None}size_bytes is None for remote URLs (the file never transits this machine).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations provided, so description fully handles transparency. Discloses behavior: source can be URL (mirrored) or local file (uploaded with ~ expansion), directories rejected, returns a detailed dict. Notes that size_bytes is None for remote URLs.

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?

Well-structured: brief intro, usage context, then clearly formatted Args and Returns sections. Every sentence is informative and earns its place.

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?

With one parameter and an output schema present, the description fully covers what the tool does, when to use it, input details, and output structure. No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description must compensate. It thoroughly explains the 'source' parameter: accepts http(s) URL or local file path, with ~ expansion, and that directories are rejected. Adds significant value beyond the schema's minimal type info.

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 clearly states the tool's purpose: uploading a local file or mirroring a remote URL to Pixio for a permanent public media URL. It distinguishes itself by explaining why it's necessary before the 'generate' tool, which only accepts http(s) URLs.

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?

Explicitly states to use this tool before 'generate' when media parameters like image_url, video_url, audio_url are needed. Provides clear context on what it returns and how to pass the result to generate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RealDealCPA-VR/Pixio-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server