Skip to main content
Glama

upload_file

Attach local files from allowed folders to a page's file input by targeting the input, upload button, or upload area; the related file input is located automatically.

Instructions

Attach local file(s) to a file input. Target the input or the upload button/area (it finds the related file input); omit the target if the page has a single file input. Files must be inside the allowed upload folders (default: Downloads, Desktop, Documents, Pictures).

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": {
      "paths": "<paths>"
    },
    "name": "upload_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoElement ref from snapshot/find, e.g. "e12" (preferred).
pathsYes
tabIdNoTab ID from tabs_list. Omit for the active tab.
elementNoVisible text or label of the element, e.g. "Sign in" (fallback).
profileNoChrome profile: folder ("Profile 3"), nickname, or unique display name. Omit to use the current profile.
selectorNoCSS selector (fallback).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does disclose two non-obvious behaviors: it resolves the related file input from a button/area target, and paths must be within allowed upload folders (defaults listed). It omits whether uploads trigger form submission, what happens on failure or oversized files, and whether the tool waits for completion.

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?

Three short sentences, front-loaded with the action, then targeting rules, then the path constraint. The parenthetical is informative rather than filler, and nothing is redundant.

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 annotations and no output schema, the definition covers targeting and file-location rules but leaves out success/failure signaling, size limits, and multi-file behavior on inputs that already hold a file. Adequate but with clear gaps.

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 already 83%, so the baseline is 3. The description adds meaning beyond the schema by explaining that the target parameters are optional when a single input exists and that a button/area reference is acceptable, which the schema does not state; the `paths` array itself remains undocumented beyond the folder restriction.

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: "Attach local file(s) to a file input." No sibling tool in the list performs uploads, so the action is unambiguously distinguishable from click/find/select_option.

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?

Gives real invocation guidance: target the input or the upload button/area, and omit the target when the page has a single file input. It does not name a fallback alternative when the upload area cannot be found, but the conditional targeting logic is clear.

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