Skip to main content
Glama

Upload secure file

upload_file

Store a file, encrypted at rest, in a project or one of its environments, from UTF-8 text or base64 bytes, up to 1 MB. Use it for credential files such as a service-account JSON or a TLS key; a single setting belongs in manage_secrets. Not idempotent: uploading a name that exists adds a second file beside it (delete_item item file removes the old one). Read files back with reveal_values item file. Refused in a protected or archived project. Audited. Requires files:write, the editor role and full access to the project.

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": {
      "project": "<project>",
      "name": "<name>",
      "content": "<content>"
    },
    "name": "upload_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesFile name as it will be listed, e.g. service-account.json
contentYesThe file's contents: plain text, or base64 when encoding is base64
projectYesProject slug or id
encodingNoHow content is written: utf-8 text (default), or base64 for binary filesutf-8
environmentNoEnvironment slug or id the file belongs to (default: the whole project)
content_typeNoMIME type, e.g. application/json (default: application/octet-stream)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A5/5.0
Behavior5/5

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

Goes well beyond the annotations: encrypted at rest, 1 MB ceiling, refusal in protected or archived projects, audited, and the exact authorization requirements (files:write, editor role, full project access). It also explains the consequence of the non-idempotent behaviour, which the idempotentHint=false flag alone does not convey.

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?

Front-loaded with the core action and size limit, then constraints, then alternatives, then behavior. Every sentence carries distinct information and none repeats the annotations verbatim.

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 non-idempotent mutating upload tool with no output schema, the description covers authorization, failure modes, duplicate-name behavior, and how to retrieve the stored file. An agent has everything needed to call it correctly and handle the aftermath.

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 already 100%, but the description still adds real meaning: it explains encoding selection (utf-8 vs base64 for binary), the interaction between content length and the 1 MB limit, and the name-collision semantics for the name parameter. This is value on top of the schema rather than a restatement.

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 plus storage scope ('in a project or one of its environments'), accepted inputs ('UTF-8 text or base64 bytes'), and size cap ('up to 1 MB'). It explicitly distinguishes itself from manage_secrets ('a single setting belongs in manage_secrets').

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 when-to-use ('credential files such as a service-account JSON or a TLS key'), when-not ('a single setting belongs in manage_secrets'), a companion for reading back ('reveal_values item file'), and the replace path ('delete_item item file removes the old one'). Nothing is left to inference.

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