Skip to main content
Glama

Upload a file to Relay

upload_file

Hosts an image, video, or audio file on Relay and returns a URL for use in run_model *_url inputs, with configurable retention.

Instructions

Hosts an image, video or audio file on Relay and returns its url: pass that url to any *_url input of run_model. Give exactly one of path (local server only, ≤ 100 MB), base64 (≤ 4 MB) or url (a public link Relay copies). retention: relay1h (default, free within a daily quota) or a media_storage SKU from get_pricing. Needs a Relay credential.

Input Schema

NameRequiredDescriptionDefault
urlNoPublic http(s) link to copy onto Relay.
pathNoLocal file path (stdio server only; the hosted server cannot read your disk). Max 100 MB.
slotNotrue: get a single-use upload URL (10 minutes): run the curl line in your shell on the local file, or open open_url in a browser and pick the file; either prints the hosted link.
base64NoFile content as base64 or a data: URI, at most 4 MB decoded. Larger files: pass url.
filenameNoFile name to record (defaults to the path's base name).
retentionNoHow long the link lives: relay1h (default, free within a daily quota) or a media_storage SKU from get_pricing (relay1d, relay7d, …).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4.7/5.0
Behavior4/5

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

Annotations only say this is a non-read-only, non-destructive, non-idempotent open-world call; the description adds the material context — size ceilings per input mode, the daily free quota on relay1h, and the requirement for a Relay credential. It stops short of saying whether repeated uploads of the same file create distinct URLs or can be cleaned up, which is the remaining gap for a write tool.

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?

A single tight paragraph: outcome first, then how to consume the result, then the input constraint, then retention policy, then the credential prerequisite. No sentence is filler.

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 6-parameter upload tool with no output schema, it covers the full lifecycle an agent needs: what gets hosted, what URL comes back, where that URL goes next, size/transport limits, retention options and the auth prerequisite. Nothing required to invoke 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 per-parameter text is already present. The description still adds value the schema cannot express: the exclusive-or relationship among path/base64/url (the schema has no oneOf) and the size limits restated at the decision point. The slot parameter is left entirely to the schema, which is acceptable since it is well documented there.

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 ('Hosts an image, video or audio file on Relay and returns its url') and immediately names the consumer of the output ('any *_url input of run_model'). This distinguishes it from every sibling, none of which handle file hosting.

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?

Gives an explicit decision rule for the three mutually exclusive inputs ('Give exactly one of path, base64 or url'), scopes path to local server only, caps base64 at 4 MB and routes larger/published files to url. It also points to get_pricing for non-default retention, so the agent knows where the alternative lives.

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