Skip to main content
Glama

browser_upload_file

Attach a file to a specific element on a web page by bypassing the native file picker. Supports multiple strategies and sources like stash, path, or base64.

Instructions

Attach a file to a target on the page. Bypasses the native OS file picker via a strategy chain (direct DOM.setFileInputFiles → file-chooser intercept → drag-drop synthesis → paste synthesis). Source can be a stashId from browser_upload_stage OR inline (path/url/dataUrl/base64). Target can be a CSS selector, accessibility ref, visible trigger element, or auto-detected from a nearby anchor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdNo
stashIdNo
pathNo
urlNo
dataUrlNo
base64No
bytesNoAlias for `base64`.
mimeNo
nameNo
filesNoFor multi-file inputs: array of source descriptors (each like the inline fields above OR { stashId }).
selectorNo
refNo
triggerNo
autoNo
strategiesNo
framesNo"all" | "top" | <frameId>all
dispatchEventsNo
waitForNo
Behavior3/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. It explains the multi-strategy approach and source/target flexibility but does not cover error handling, permissions, or side effects like page navigation. Adds significant context beyond schema but leaves gaps.

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?

Two sentences, first sentence states purpose concisely, second sentence details core options. No redundant words. Could be more structured but effective and front-loaded.

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

Completeness2/5

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

Given the complexity (18 parameters, no output schema, no annotations), the description covers only the essentials. Lacks details on multi-file uploads, event dispatching, frame targeting, wait options, and success/failure behavior. Incomplete for a tool of this complexity.

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?

Schema coverage is low (17%) with only 18 parameters. The description explains the high-level groupings (source: stashId/inline; target: selector/ref/trigger/auto) which adds meaning. However, many parameters like mime, name, dispatchEvents, waitFor are not elaborated, leaving significant meaning undiscovered.

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 clearly states 'Attach a file to a target on the page.' with specific details about bypassing the native OS file picker via a strategy chain. This distinguishes it from other browser tools like browser_upload_stage and browser_click, providing a clear verb and resource.

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?

The description explains the strategy chain and source/target options, giving implicit context for when to use (automation scenarios). However, it does not provide explicit when-not-to-use guidance or direct comparisons to sibling tools like browser_upload_stage for staging files.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DevZonayed/Mochi'

If you have feedback or need assistance with the MCP directory API, please join our Discord server