Skip to main content
Glama

Upload a file

upload_file

Save a small file (at most 1 MiB) in the organization, to give runs as input (a run's or workflow's files, by id): text as content, or binary data base64-encoded as content_base64. Files are kept until deleted, unless expires_in_days or the organization's retention policy says otherwise. Stored files are billed with storage (get_storage). Returns the file with its id.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
keepNoKeep the file whatever the retention policy says.
nameYesA relative path, such as data/prices.csv.
contentNoThe file's text.
content_base64NoThe file's bytes, base64-encoded, instead of content.
expires_in_daysNoDelete the file after this many days.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: states the 1 MiB size cap, the retention model (kept until deleted unless expires_in_days or org policy), that storage is billed and visible via get_storage, and that the returned file carries its id. These are exactly the operational facts an agent needs before a write, and nothing contradicts the supplied hints.

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-loads the size limit and purpose, then covers retention, billing, and the return value in a compact block. It is slightly run-on with parenthetical asides, 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?

For a write tool with no output schema, this covers size limits, persistence/expiry, cost implications, and the returned id — everything needed to call it correctly. Minor gaps around overwrite semantics on duplicate names are tolerable given the annotations already flag non-idempotency.

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, but the description adds real meaning by explaining that content is for text and content_base64 is the base64 alternative, and that expires_in_days drives auto-deletion. It does not clarify how keep interacts with expires_in_days or whether existing names collide.

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?

States a concrete verb (save/upload) and resource (a small file, at most 1 MiB) plus the reason it exists: to give runs as input. It is clearly not a read/delete/list tool, though it does not explicitly distinguish itself from the sibling update_file, which is the main ambiguity left.

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 clear usage context — supplying run/workflow input files by id — and explains the text-as-content vs binary-as-content_base64 split. It stops short of naming alternatives or exclusions (e.g., when to use update_file instead of re-uploading).

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