Skip to main content
Glama

Extend MCP

Upload a file from the user's computer

upload_file

Upload a file from the user's computer (files group). Returns a dashboard upload link; uploaded file IDs only become available after the user completes the upload in their browser, so the link should be surfaced to the user before calling get_file_upload with the returned uploadId. The link expires at expiresAt and cannot be re-fetched — call this tool again for a fresh one. Documents already at a public https:// URL can be passed to tools directly without uploading.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageNoOne line shown to the user on the upload page, e.g. "Upload the invoice you mentioned".
maxFilesNoMax files the user may upload on the page (default 20).
environmentYes"TEST" = the Test (development) environment, "PRODUCTION" = live. Must match a granted target from get_me (an API key pins one environment).
workspaceIdYesTarget workspace (ws_...). Must be a granted workspace — get_me lists the accepted values.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesDashboard upload page for the user to open in a browser.
maxFilesYes
uploadIdYesPass to get_file_upload to retrieve the uploaded file ids.
expiresAtYesWhen the upload link stops accepting uploads.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

The description adds important non-obvious behavior beyond the annotations: the upload link expires at expiresAt, cannot be re-fetched, and a fresh one requires calling this tool again. It also discloses that file IDs become available only after the user completes the browser upload, which is essential for correct agent behavior. This goes well beyond the read/idempotent/destructive hints.

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?

The description is dense but every sentence adds critical operational information: the core action, the asynchronous browser step, the expiry/non-refetch behavior, and the public-URL alternative. It is front-loaded with the main purpose and stays within a compact length.

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 tool that depends on a user-side browser action, the description is complete: it explains the returned link, the uploadId timing, expiry, re-fetch behavior, and when not to use the tool. An output schema exists, so return-value detail is not the description's burden, and the description still names the key returned fields.

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?

The input schema already documents all four parameters with 100% coverage, including the environment enum, workspace ID format, message purpose, and maxFiles default. The description does not add parameter-level detail, but with complete schema coverage the baseline of 3 is appropriate.

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 verb and resource: 'Upload a file from the user's computer' and distinguishes this tool from get_file_upload by explaining the upload-link flow and the later retrieval step. It is unambiguous and clearly not a generic file retrieval or listing operation.

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?

The description explicitly says when to use this tool (files from the user's computer) and gives a concrete alternative: public https:// documents can be passed directly to tools without uploading. It also explains the required sequencing with get_file_upload, telling the agent to surface the link before calling that sibling.

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