Skip to main content
Glama

browser_upload

Sets files on a file input without opening the OS picker, so headless or phone browsers can upload. Returns the accepted file names and count.

Instructions

Put files into a file input without opening the OS picker (which a headless or phone browser cannot answer). Absolute paths on this machine; the input must be . Returns the file names and how many the input accepted.

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": {
      "ref": "<ref>",
      "files": "<files>"
    },
    "name": "browser_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesRef of the file input (e12), or its CSS selector
filesYesAbsolute paths on this machine

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.5.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It does disclose useful constraints (absolute paths, target must be an <input type=file>, and what is returned), but omits whether files replace or append to existing selections, whether change events fire, and what happens on a bad path or non-file input.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences, front-loaded with the action and its rationale, followed by the two hard constraints and the return value. Nothing is padded or repeated.

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?

A simple two-parameter tool with no output schema, and the description covers the return shape ('file names and how many the input accepted') as well as the input-type constraint. Only failure behavior is left unaddressed.

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 100%, so the schema already documents both parameters. The description reinforces that paths are absolute and adds that the ref must resolve to a file input, which is meaningful context for 'ref' but largely duplicates the schema.

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?

States a concrete verb and resource ('Put files into a file input') plus the key differentiator that it bypasses the OS picker. An agent can distinguish it from browser_fill or browser_click without opening the schema, though it never names those siblings explicitly.

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 a clear condition for use: headless or phone browsers cannot answer the OS file picker, so use this instead. It stops short of stating when not to use it (e.g. when a real picker interaction is desired) or naming an alternative tool.

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