Skip to main content
Glama

browser_upload_files

Destructive

Attach local files to a file input by clicking its selector, button, or label and supplying allowed absolute paths; handles hidden inputs via labels and supports multiple files when the input allows.

Instructions

Attach local files to a file input, the way a person picks them.

selector is the <input type=file> itself, or the button or label that opens its chooser: that is clicked with the real pointer and the chooser answered with paths. A hidden input is opened through its label; with none, pass the button that opens it. Several files need an input that takes several; otherwise upload them one call at a time.

Each path is absolute and names a regular file inside a directory listed in INVISIBLE_MCP_UPLOAD_DIRS, through no hidden directory; with none listed, uploads are off. Never use browser_evaluate to set files. Inside an iframe, pass the snapshot's frame.

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

Input Schema

NameRequiredDescriptionDefault
frameNo
pathsYes
browserNoDefaults to `main`; `support` is the helper beside it.
selectorYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.74.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructive, open-world, non-read-only behavior, so the description goes further by disclosing the INVISIBLE_MCP_UPLOAD_DIRS allowlist requirement and that uploads are disabled when no directories are listed. It also covers hidden-input handling and iframe framing, which are real behavioral constraints beyond the annotations.

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?

The opening line front-loads the core action and the remaining sentences are dense with necessary constraints. It is multi-line and slightly prose-heavy, but each sentence carries operational value rather than 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?

Given an output schema exists, the description need not explain returns, and it covers the remaining complexity well: security allowlist, hidden inputs, multi-file limits, and iframe framing. An agent has enough to call this correctly without opening the schema.

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 only 25%, so the description must compensate and largely does: it defines selector's dual role, constrains paths to absolute regular files inside allowed directories with no hidden components, and explains frame for iframe contexts. The browser parameter is left to the schema's own description.

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 ('attach local files to a file input') and immediately clarifies the human-equivalent behavior. It also distinguishes the tool from the sibling browser_evaluate by explicitly forbidding that route for setting files.

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 operational guidance: selector can be the input itself or the button/label that opens the chooser, and multi-file uploads require a multi-file input or one call per file. The explicit 'never use browser_evaluate to set files' is a useful exclusion, though there is no broader when-not guidance.

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