Skip to main content
Glama

browser_file_upload

Set files on a file input as if a user picked them, triggering change handlers without opening a dialog. Use this to test uploads programmatically.

Instructions

Set the files of an as picked files land: change handlers run, no dialog opens.

Input Schema

NameRequiredDescriptionDefault
refNoElement ref from browser_snapshot, e.g. 12
textNoVisible text or label of the element, instead of ref
pathsYesFiles in the working directory
selectorNoCSS selector (first match), instead of ref
snapshotNoAlso return the page snapshot after the action

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A3.6/5.0
Behavior4/5

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

The description adds useful behavioral context beyond the annotations: it states that change handlers run and no dialog opens. This tells the agent that the native file picker is bypassed and that the input's event listeners will fire. It does not, however, cover possible failure modes or permission requirements.

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 description is a single, front-loaded sentence with no wasted words. The phrasing 'as picked files land' is slightly awkward but does not hinder comprehension.

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?

For a tool with five parameters and full schema coverage, the description covers the core purpose and some behavior. It could be more complete by mentioning that paths are required and must reference files in the working directory, or by noting what happens with invalid paths or multiple files.

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?

With 100% schema description coverage, all five parameters are fully documented in the input schema. The description does not add any further meaning beyond what the schema already provides, so the baseline of 3 is appropriate.

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?

The description clearly states the verb and resource: setting the files of an <input type=file> without opening a dialog. It distinguishes the tool from a generic fill or click by focusing on file inputs, though it doesn't explicitly name which sibling to use instead.

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 implied by the tool name and the note that no dialog opens, suggesting it is for programmatic file selection. However, there is no explicit guidance on when to use this versus alternatives like browser_fill or browser_click on a file input.

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