Skip to main content
Glama

Upload local file to input

browser_upload_file

Attach a local file from disk (up to 25 MB) to a file input on the controlled page to complete uploads.

Instructions

Attach a local file (up to 25 MB) from disk to a file input () on the controlled page.

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

Input Schema

NameRequiredDescriptionDefault
refNoElement ref of the <input type='file'> element.
tabIdNoControlled tab id.
filePathYesLocal file path on disk to upload.
mimeTypeNoOptional MIME type override (inferred from extension if omitted).
selectorNoCSS selector of the <input type='file'> element.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, and destructiveHint=false, so the mutation/open-world profile is covered. The description adds a genuinely useful constraint (25 MB ceiling, source is local disk), but omits whether an existing attachment is replaced, whether a change event fires, and how missing-file errors surface.

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 sentence with the action, the target, the size cap, and the target page all front-loaded. Nothing is redundant and nothing could be cut without losing information.

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 five-parameter, no-output-schema tool with full schema coverage, the description plus annotations give an agent enough to call it correctly. The remaining gaps (ref vs selector precedence, tab defaulting, post-upload page effects) are minor given the schema already documents the parameters.

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 all five parameters (ref, tabId, filePath, mimeType, selector) are already documented in the schema. The description adds no per-parameter meaning beyond restating that the target is a file input; the 25 MB limit is a global constraint rather than a parameter clarification.

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 ('Attach a local file ... to a file input') along with the concrete target element type and the 25 MB cap. It is clearly distinct from browser_type/browser_click in intent, though it never explicitly contrasts itself with those siblings.

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

Usage Guidelines3/5

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

Usage is implied by the parenthetical restriction to <input type='file'> elements, which tells the agent this tool is inapplicable to ordinary text fields. However, there is no explicit guidance on when to prefer this over clicking/typing on the input, nor on choosing between the ref and selector targeting parameters.

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