Skip to main content
Glama

browser_upload_file

Sets files into an element via the Chrome Debugger API, so uploads complete without an open file dialog. Use browser_drop_file for drag-and-drop zones with no visible input.

Instructions

Handing a file to the page needs "Allow access to file URLs" for the Agent360 Browser MCP extension (off by default for Chrome Web Store installs); that switch also lets the extension open any local file as a page, so whether to turn it on is the user's call. A "Not allowed" error from the handoff is reported as file-access-off unless Chrome confirms that file access is on. Upload a file to a element on the page. Uses Chrome Debugger API to set files programmatically - no dialog needed. For drag-drop zones without visible file input use browser_drop_file. If the field is empty afterwards although the page's change handler saw the file in it, the answer is ok with cleared_by_page: true and seen_in_field - X and Facebook empty the field after reading the file, and a page that rejects the file can do the same, so check the page before attaching again. Files must be regular files inside the working directory the MCP server runs in - folders, symlinks and hardlinks that point outside it are refused.

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

Input Schema

NameRequiredDescriptionDefault
fileNoSingle file path (alternative to files array). Alias: `file_path`.
filesYesArray of absolute file paths to upload. E.g. ["/Users/me/photo.jpg"]
selectorNoCSS selector for the file input (default: input[type="file"])
partitionNoRun this call in a partition from browser_partition (an id like "p1"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.33.0
    • addedInput schema / properties / partition
      Added value: +{
      +  "description": "Run this call in a partition from browser_partition (an id like \"p1\"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv1.28.0
    • changedInput schema / properties / file / description
      Previous value: -"Single file path (alternative to files array)"New value: +"Single file path (alternative to files array). Alias: `file_path`."
  3. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

No annotations exist, and the description carries the full burden well: it discloses the required 'Allow access to file URLs' extension setting, the security side effect of that switch (can open any local file as a page), the 'file-access-off' error mapping, the cleared_by_page/seen_in_field success signal, and path restrictions rejecting folders, symlinks, and hardlinks escaping the working directory.

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

Conciseness3/5

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

The content is substantive but poorly front-loaded: the first sentence is a permission caveat and the actual purpose only appears third. The mid-paragraph aside about sites like X and Facebook is useful but buried, so an agent scanning the opening gets context before it learns what the tool does.

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?

With no annotations and no output schema, the description covers permissions, error signaling, path constraints, and the tricky cleared-field case, which is more than most. It still does not describe the general success response shape or what happens on multi-file partial failures.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real constraints on the file path parameters that the schema does not state: files must be regular files inside the server's working directory, with symlinks and hardlinks refused. The partition parameter is not discussed, keeping it from a 5.

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: 'Upload a file to a <input type="file"> element on the page', plus the mechanism (Chrome Debugger API, no dialog). It also names the sibling it is not for drag-drop zones, so an agent can distinguish it from browser_drop_file.

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?

Explicitly routes drag-drop cases to browser_drop_file and warns against re-attaching when the field was cleared by the page. Lacks a broader statement of preconditions deciding when upload is the right approach versus script-based alternatives, but the main fork is covered.

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