Skip to main content
Glama

Get an upload link for a big file

upload_file

Free. A tool request is capped at 4.5 MB in total, and inline base64 files count toward it (base64 adds a third). For a bigger file, or any local file you would rather not inline (a long voice track, a full-size photo, a video), call this first: it returns a one-time uploadUrl and the fileUrl the file will have. PUT the file's raw bytes to uploadUrl within 15 minutes with the returned content-type header (the response includes a ready curl command; up to 100 MB), then pass fileUrl in the tool's file field (for example image or audio) with run_tool. One file per link. The file is deleted once a call that used it succeeds, so upload again for each new call; if no call succeeds with it, it is deleted after 6 hours.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "upload_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameNoOptional instead of content_type: the file's name, e.g. 'voice.mp3'; its extension sets the type.
content_typeNoThe file's media type: image/jpeg, image/png, image/webp, image/gif, audio/mpeg, audio/wav, audio/flac, audio/ogg, audio/mp4, video/mp4, video/webm, video/quicktime or application/pdf.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations, which only say this is not read-only or idempotent. The description discloses the 15-minute upload window, the 100 MB ceiling, one-file-per-link, the content-type header requirement, that the file is deleted after a successful call, and the 6-hour orphan cleanup — exactly the lifecycle facts needed to avoid breaking a later run_tool call.

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 size cap and the 'call this first' directive are front-loaded, and the subsequent sentences each carry a distinct operational fact. It is dense and runs long with stacked parentheticals, but 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?

With no output schema available, the description takes on the burden of describing the return value and does so: a one-time uploadUrl, the resulting fileUrl, and a ready curl command in the response. Size limits, TTLs, and deletion rules complete the picture an agent needs to use the link correctly.

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

Parameters3/5

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

Schema coverage is 100% and both parameters are optional, with the schema already explaining that filename's extension sets the type when content_type is omitted. The description adds nothing further about choosing between the two fields, so the baseline 3 applies rather than higher.

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 action (get a one-time uploadUrl plus the resulting fileUrl) and immediately distinguishes it from the alternative of inlining base64, which the tool caps at 4.5 MB. An agent can tell exactly what this tool returns and how it differs from the inlining path without opening the 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?

Explicit when-to-use criteria are given: any file over 4.5 MB, or any local file the caller prefers not to inline (voice track, photo, video). The follow-on path is spelled out too — PUT bytes to uploadUrl, then pass fileUrl in run_tool's file field — so the agent knows both the trigger and the next step.

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