Skip to main content
Glama

browser_drop_file

Attach a local file to a page's upload field when standard upload fails, handling file inputs or native file-chooser dialogs.

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 when browser_upload_file fails. Two strategies: (1) uses the target itself when it is a file input, or a hidden inside it; (2) if there is none, clicks the target and intercepts the NATIVE OS file-chooser it opens - pass the selector of the button that opens the dialog, and the file is supplied programmatically without the dialog ever appearing. Other file inputs on the page do not get the file: when neither strategy works, the error lists them in other_file_inputs, each with a selector to pass if it is the right field - a CSS selector that matched that input alone when the tool looked (built from its id, its name or its position on the page), or null when none did, for instance for an input inside a shadow root. The answer describes the input that got the file in input. 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": {
      "selector": "<selector>"
    },
    "name": "browser_drop_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoSingle absolute file path. Alias: `file_path`.
filesNoArray of absolute file paths
selectorYesCSS selector for the drop-zone target element (e.g. ".upload-area")
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 absolute file path"New value: +"Single absolute file path. Alias: `file_path`."
  3. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the required 'Allow access to file URLs' extension setting (off by default), the file-access-off error mapping, that the native dialog 'never appears', the working-directory restriction that refuses folders/symlinks/hardlinks, and the cleared_by_page/seen_in_field post-conditions. It stops short of stating auth/rate/partition behavior, but the safety-relevant surface is unusually well covered.

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?

Everything stated is substantive, but it is delivered as one dense paragraph of run-on sentences with the permission prerequisite front-loaded instead of the action. The lead should be what the tool does, with the extension-permission caveat and edge cases demoted to later sentences.

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?

For a multi-mode tool with no annotations and no output schema, the description fills most gaps by documenting the returned fields (`input`, `other_file_inputs`, `cleared_by_page`) and known page behaviors like X/Facebook clearing the field. Only the `file` vs `files` choice and partition routing remain undocumented outside the schema.

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 baseline is 3, but the description earns above baseline by clarifying that in strategy 2 the selector should be the button that opens the dialog rather than a file input, and by explaining the per-item `selector` in other_file_inputs (built from id/name/position, null inside shadow roots). It does not explain when to use `file` versus `files`, or how `partition` interacts, leaving that entirely to 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?

The description does convey a specific action (attaching a file to a page target) via two named strategies, and it distinguishes itself from browser_upload_file. However, the actual purpose is buried after two sentences about extension permissions, so the agent must read past setup caveats before learning what the tool does.

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

Usage Guidelines5/5

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

It explicitly positions itself as the fallback: 'Upload a file when browser_upload_file fails.' It then routes between the two internal strategies (use the target/file input directly vs. click and intercept the native OS chooser) and tells the agent to re-call with a selector from other_file_inputs when neither works. That is concrete when-to-use and when-to-retry guidance with the alternative named.

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