Skip to main content
Glama

Upload File

upload_file

Assigns absolute server-side file paths to an HTML file input, bypassing the OS picker and optionally enforcing allowed root directories.

Instructions

Set .files (skip OS picker). Paths absolute on server FS.

Security: if UMBRA_UPLOAD_ROOT env is set (colon-sep allowlist of dirs), every path must resolve under one of those roots. Unset → no restriction (legacy default; set the env in any agent-driven deployment). Ex: upload_file('t0', 'input[type=file]', ['/abs/img.png']) → {"ok":true}

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": {
      "tab_id": "<tab_id>",
      "selector": "<selector>",
      "paths": "<paths>"
    },
    "name": "upload_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathsYes
tab_idYes
selectorYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses that the OS picker is skipped, that paths are resolved on the server filesystem (not the client), and that an UMBRA_UPLOAD_ROOT allowlist governs which directories are permitted, including the risky 'unset → no restriction' default. It omits failure behavior, whether uploads are awaited, and file-size or remote-URL constraints.

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 the core mechanism in the first sentence, then security constraints, then a concrete example — a sensible order with no filler. The env-var paragraph is dense but each clause (allowlist, unset default, deployment advice) carries distinct meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema exists and the example shows an ok response, so return values need no more detail. However, for a three-parameter tool with zero schema coverage and no annotations, the definition leaves gaps an agent would hit in practice: what happens on a rejected path or bad selector, and whether the upload must be awaited.

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 0%, so the description must compensate, and it largely does: the example `upload_file('t0', 'input[type=file]', ['/abs/img.png'])` maps positional arguments to tab_id, selector, and paths, and the text pins down that paths are absolute server paths. It still never states selector syntax or where tab_id comes from, leaving some inference.

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 precise mechanism: sets `<input type=file>.files` and explicitly bypasses the OS picker, so it is clearly not a generic form fill. It is distinguishable from fill_form/evaluate, though it never names those siblings to make the contrast explicit.

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

Usage Guidelines3/5

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

Usage is only implied: you call it when you need to populate a file input. There is no stated condition for preferring it over fill_form or evaluate, and no prerequisites such as needing a tab_id from list_tabs or the input being present in the DOM.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.