Skip to main content
Glama

browser_set_files

browser_set_files

Attach local files to a browser file input by specifying absolute paths, target tab, and element ID for automated uploads.

Instructions

Set files on a file input element using absolute local paths.

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": {
      "tab_id": "<tab_id>",
      "element_id": "<element_id>",
      "files": "<files>"
    },
    "name": "browser_set_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYes
tab_idYes
frame_idNoChrome frame ID inside the tab from browser_get_frames. 0 is the top document, which is the default.
element_idYesOpaque element_id returned by browser_get_interactives.
session_idNoSession that owns the tab. Pass it on every call so the runtime can refuse a tab another session holds.
session_nameNoName for this conversation's Chrome tab group, so the tab bar reads as the task instead of a generated id. Sticky: pass it once when the name becomes clear, and again only to rename.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=true, so the safety profile is covered. The description adds the meaningful constraint that paths must be absolute and local, but says nothing about whether existing file selections are replaced, whether change events fire, or what happens on invalid paths.

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?

A single front-loaded sentence with no filler; the operative constraint (absolute local paths) is placed where it will be read first.

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

Completeness3/5

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

For a 6-parameter mutation tool with no output schema, the description is thin: it omits the element-lookup prerequisite, the session ownership semantics, and any post-call behavior. The schema carries much of the load, but the description does not fully cover what an agent needs to invoke this correctly.

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 67%, with frame_id, element_id, session_id and session_name documented in the schema itself. The description adds real meaning for the undocumented 'files' parameter by specifying absolute local paths, but contributes nothing about tab_id or the interaction between session_id and session_name.

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 specific verb and resource ('Set files on a file input element') plus a key constraint ('absolute local paths'), which clearly separates it from siblings like browser_type or browser_click. It does not explicitly name a sibling alternative, but the action is unambiguous.

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 guidance on when to use this versus browser_type or browser_click, no mention that the element must first be located via browser_get_interactives, and no prerequisites or exclusions. The agent must infer the workflow entirely.

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