Skip to main content
Glama
playwright-mcp-router

playwright-mcp-router

by huangzt

browser_file_upload

Destructive

Upload one or multiple files to the isolated browser session using absolute paths; omitting paths cancels the file chooser.

Instructions

Upload one or multiple files

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": {
      "session": "<session>"
    },
    "name": "browser_file_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorNoOptional Chrome tab group color override for a newly created session.
pathsNoThe absolute paths to the files to upload. Can be single file or multiple files. If omitted, file chooser is cancelled.
accountNoChrome account profile to use (defaults to 'default'). Configured accounts: 'default' (Isolated Browser).default
sessionYesRequired isolated session name (also displayed as the Chrome tab group title), e.g. "T1867-api-debug" or "home-css". Use a unique, descriptive task name per conversation so concurrent agents never hijack each other's active tab.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=true, so the safety profile is known. The description adds nothing beyond the annotations — it does not disclose that the operation requires an already-triggered file chooser, that the uploaded files land in the page's input, or what happens if the chooser is absent.

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?

A single short sentence with no filler and the purpose front-loaded. It is efficient, though its brevity borders on under-specification rather than disciplined concision.

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?

This is a destructive, open-world browser interaction whose correctness depends on prior page state (an open file chooser), yet the description supplies none of that context. With no output schema to rely on, the definition is too thin for an agent to invoke it confidently without inference.

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 description coverage is 100%, so the schema already explains paths, session, account and color in detail, including that omitting paths cancels the chooser. The description contributes no parameter meaning beyond that, so it sits at the baseline for high-coverage schemas.

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 names a specific verb and resource ("Upload") plus cardinality ("one or multiple files"), so an agent can tell what the tool does at a glance. It does not differentiate from other file-input pathways in the sibling set (e.g. browser_drop), leaving the boundary implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not-to-use guidance, and no mention of the crucial precondition that a file chooser must be open (typically after a click on an upload control). The agent gets no help deciding this tool over alternatives such as browser_drop or browser_click.

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