Skip to main content
Glama

upload

Attach local files to an element by providing absolute paths, enabling browser form automation.

Instructions

Set files on an element (absolute local file 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": {
      "target": "<target>",
      "files": "<files>"
    },
    "name": "upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYesAbsolute local file paths
tabIdNo
targetYesref from snapshot: "e12" (single-agent) or "a<actor>:e12" (multi-agent session, copy exactly as shown), or a CSS selector

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / target / description
      Added value: +"ref from snapshot: \"e12\" (single-agent) or \"a<actor>:e12\" (multi-agent session, copy exactly as shown), or a CSS selector"
  2. First observedv0.2.1

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden, and it discloses almost nothing beyond the mutation. It does not say whether existing file selections are replaced, whether change/input events fire (critical for JS-driven upload widgets), whether paths must exist locally, or how errors surface. For a write-style browser action with zero annotation coverage, this is a significant gap.

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

Conciseness4/5

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

A single tight sentence with the operative constraint front-loaded, and the parenthetical keeps the path-format requirement adjacent to the action. Slight redundancy with the schema's own description of `files` keeps it off a perfect score.

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 three-parameter browser action with no annotations and no output schema, the definition covers what the tool does but not how it behaves on success or failure. The undocumented tabId and the silence on event dispatch leave real gaps an agent would need to probe by trial.

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 67%, so the schema documents target (ref or CSS selector) and files. The description only restates the absolute-local-path format already present in the schema and says nothing about tabId, which is undocumented in both places. Marginal value added, consistent with a baseline 3.

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 an <input type=\"file\"> element" — unambiguous about both the action and the exact DOM element it applies to, which cleanly separates it from generic siblings like type or click. It stops short of explicitly naming those alternatives, but the element specificity does most of the disambiguating work.

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?

The mention of `<input type="file">` implicitly tells the agent the condition under which this tool applies rather than type. However, there is no explicit "do not use type for file inputs" statement, no prerequisites (does the element need focus? must the input be visible/enabled?), and no discussion of failure modes for invalid paths.

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