Skip to main content
Glama

Upload File

upload-file

Store a file in this workspace. Returns suggested_markdown to embed the file in a rich-editor field (note body, task description), and file_id to refer to the stored file. Pass exactly one of: base64 with filename, or upload_id from create-upload-url. filename is optional with upload_id but recommended. Allowed types: pdf, doc, docx, xlsx, pptx, jpg, jpeg, png, gif, webp; 10 MB max. Limited to 60 calls per hour per workspace, refused files included.

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
base64NoThe file body, base64 encoded. Requires filename.
filenameNoThe original file name. Required with base64. Optional with upload_id, where the name is otherwise rebuilt from the id, losing capitals and spaces.
upload_idNoThe upload_id from create-upload-url after the PUT succeeded.

Output Schema

NameRequiredDescriptionDefault
urlYesA link to view the file now. It expires after 30 minutes; do not store it.
nameYes
sizeYes
file_idYesThe stored file id.
mime_typeYes
suggested_markdownYesStable markdown to paste into a rich-editor field.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / source_url
      Removed value: -{
      -  "description": "A public https URL to fetch. No redirects are followed.",
      -  "type": "string"
      -}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, it discloses the accepted MIME/file-type list, a 10 MB size ceiling, and a per-workspace rate limit of 60 calls/hour that explicitly counts refused files. It also warns that the filename is rebuilt from an upload_id (losing capitals and spaces) when omitted, which is non-obvious side-effect information an agent needs.

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 purpose and returns, then parameter rules, then limits — no redundancy and no filler. Every clause (type list, size cap, rate limit, filename caveat) carries actionable information.

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?

An output schema exists so return values need no elaboration, and the description nevertheless names the key fields. Access rules, size/type limits, throttling, and the two input modes are all covered, leaving nothing an agent needs before calling it.

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?

Although schema coverage is already 100%, the description adds the critical constraint the schema cannot express: exactly one of base64+filename or upload_id must be supplied, even though the schema lists zero required parameters. It also marks filename as recommended with upload_id and explains the consequence of omitting it.

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 opens with a specific verb+resource ('Store a file in this workspace') and immediately states the two return artifacts (suggested_markdown and file_id). Referencing create-upload-url as the source of upload_id makes clear how this tool relates to its closest sibling.

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?

It gives an explicit mutual-exclusion rule ('Pass exactly one of: base64 with filename, or upload_id from create-upload-url') and names the prerequisite tool for the second path. It stops short of saying when to prefer one path over the other (e.g. size-based choice), which would be the final piece of routing guidance.

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.