Skip to main content
Glama

Upload file

upload_file

Upload any plan-allowed file. Images go to the CDN; video/audio/pdf/zip go to R2. Returns a mediaId: {{ '' | file_url }} works in an , , or a collection url/media field (images: {{ '' | image_url: width: 800 }}). Web files: fileUrl. dataBase64 is a last resort (~3MB cap; pass mimeType for non-images).

Input Schema

NameRequiredDescriptionDefault
idNoSite id.
fileUrlNoPublic URL of the original file — no resize params.
privateNoStore privately for set_download (any type; no public url). Needs filePath.
filenameNoFilename hint.
mimeTypeNoRequired with dataBase64 for non-images, e.g. video/mp4, application/pdf.
dataBase64NoBase64 of a real file's bytes, never base64 you write out (it arrives cut off). ~3MB cap; prefer imageUrl.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / dataBase64 / description
      Previous value: -"Base64 or data URL. Last resort: ~3MB cap."New value: +"Base64 of a real file's bytes, never base64 you write out (it arrives cut off). ~3MB cap; prefer imageUrl."
  2. Changed1 schema field changed
    • addedInput schema / properties / private
      Added value: +{
      +  "description": "Store privately for set_download (any type; no public url). Needs filePath.",
      +  "type": "boolean"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / id / description
      Previous value: -"Site id. Pass it on every call."New value: +"Site id."
  4. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations only say non-read-only, non-idempotent, open-world, non-destructive; the description adds the meaningful behavior — where bytes are stored, what identifier comes back, and the base64 size ceiling. The `private`/set_download path is left to the schema and the phrase 'plan-allowed' is undefined, which keeps this from a 5.

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?

Front-loaded with purpose and routing, then moves to the return value and per-input guidance. Dense but nearly every clause carries information; the inline template expressions are the only noisy part.

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 correctly takes on return-value duty by naming both `mediaId` and `fileUrl` and showing where each is usable. What remains thin is the `private`/set_download workflow and the meaning of 'plan-allowed', neither of which is spelled out.

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 already 100%, so the baseline is 3, and the description adds usable meaning on top: `fileUrl` is for the original unresized file, `dataBase64` is a fallback with a cap, `mimeType` pairs with base64 for non-images. The mismatched 'imageUrl' reference is the one blemish.

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?

Clear verb+resource ('Upload any plan-allowed file') plus a concrete storage-routing rule (images→CDN, video/audio/pdf/zip→R2) and the returned handle. It is distinguishable in substance from the sibling upload_image, but it never names that sibling, so an agent must infer which tool to pick for images.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real selection guidance among inputs: use `fileUrl` for web files, `dataBase64` only as a last resort with a ~3MB cap and a required mimeType for non-images. It stops short of stating when to prefer upload_image or set_download instead, and 'prefer imageUrl' references a parameter name that does not exist in the schema (the field is `fileUrl`).

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