Skip to main content
Glama

browser_upload_file

Set files on a page's file input directly through the Chrome Debugger API, bypassing the native file picker.

Instructions

Upload a file to a element on the page. Uses Chrome Debugger API to set files programmatically - no dialog needed. For drag-drop zones without visible file input use browser_drop_file. Files must be regular files inside the working directory the MCP server runs in - folders, symlinks and hardlinks that point outside it are refused.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoSingle file path (alternative to files array). Alias: `file_path`.
filesYesArray of absolute file paths to upload. E.g. ["/Users/me/photo.jpg"]
selectorNoCSS selector for the file input (default: input[type="file"])

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.28.0
    • changedInput schema / properties / file / description
      Previous value: -"Single file path (alternative to files array)"New value: +"Single file path (alternative to files array). Alias: `file_path`."
  2. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden, and it delivers: it discloses the mechanism (Chrome Debugger API, programmatic file setting, no dialog), and the hard constraints (regular files only, must be inside the working directory, folders/symlinks/hardlinks pointing outside refused). This goes well beyond the bare 'upload' verb, though it stops short of describing failure/return behavior.

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?

Four sentences, each earning its place: purpose is front-loaded, mechanism follows, then the sibling routing and constraints. The final sentence is a bit dense with the symlink/hardlink qualifications, but there is no wasteful or redundant content.

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

Completeness4/5

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

The description covers the essential decision-making: what it does, how it works, the alternative tool, and the path restrictions an agent must respect. With no output schema, a brief note on outcome/error behavior would have made it fully complete, but nothing critical for selecting and invoking the tool correctly is missing.

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 100%, so the schema already documents all three parameters. The description adds genuinely useful semantics on top by constraining what values are valid for file/files: they must be regular files inside the server's working directory, and symlinks/hardlinks pointing outside are refused. This changes how the agent constructs arguments.

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+resource: 'Upload a file to a <input type="file"> element on the page.' It targets a precise element type and is clearly distinguished from the sibling browser_drop_file, which handles drag-drop zones. An agent can identify what this tool does without opening the schema.

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 names the alternative: 'For drag-drop zones without visible file input use browser_drop_file.' This tells the agent exactly when to choose this tool over its closest sibling, leaving nothing to inference.

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