Skip to main content
Glama

browser_upload_file

Attach local files to a browser page's file input or drop zone without opening the OS file dialog, supporting single or multiple files and streaming uploads.

Instructions

Attach local file(s) to a page's upload control - no OS file dialog.

The bridge reads the file from disk and streams it into the page, which builds real File objects and sets them on the (firing input + change). If the selector is a drop zone with no input inside, it fires dragenter/dragover/drop.

Args: path: absolute file path, or a list of paths for multi-file inputs. selector: the file input, an element containing it, or a drop zone. Omit to use the first input[type=file] on the page. mode: "auto" (input if found, else drop), "input", or "drop". tab_id: target tab (default: active). Pass it for anything big - the upload streams in ~384 KB chunks and must keep hitting the same tab.

Returns {ok, mode, files: [{name, size, type}], chunks, bytes, transport, seconds}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoauto
pathYes
tab_idNo
selectorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so richly: it explains the bridge reads from disk, streams in ~384 KB chunks, constructs real File objects, fires input + change on an <input type=file>, and falls back to dragenter/dragover/drop on a bare drop zone. It also discloses the tab-affinity constraint for large uploads, which is a real operational gotcha.

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 purpose, then mechanism, then a well-organized Args block and a return-shape line. Every element is load-bearing given the 0% schema coverage, though the multi-line prose is on the longer side for a single tool.

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?

No annotations and no output schema exist, and the description fills both gaps: it covers mutation behavior, event side effects, chunking, tab pinning, and the exact return payload ({ok, mode, files, chunks, bytes, transport, seconds}). An agent has everything needed to call this correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it documents all four parameters: path (absolute, or list for multi-file), selector (input, containing element, or drop zone), mode (with its three literal values spelled out since no enum exists in the schema), and tab_id (default active, plus why to pin it). This adds meaning the schema cannot supply.

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 file(s) to a page's upload control') and immediately differentiates itself from OS-level file dialogs. No sibling tool (browser_drag, browser_form_fill, browser_fill) overlaps with this behavior, so the scope is unambiguous.

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 context: omit selector to hit the first input[type=file], use mode 'auto'/'input'/'drop' depending on the target, and pass tab_id for anything large. It does not name when-not-to-use or an alternative tool, but no plausible sibling alternative exists for file attachment, so the missing exclusion is low-cost.

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

Deploy Server

Other Tools