Skip to main content
Glama

upload

Attach local files to a file input or button using element refs, role/name locators, or tab targeting.

Instructions

Attach local files via a file input or an upload button ref.

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoElement ref from the latest snapshot, e.g. e12 or f1e5
tabNoTab id. Default: your own target tab (each agent session gets its own)
findNoInstead of ref: the role and name as the snapshot shows them, e.g. {role:"button", name:"Save"}; nth:2 picks the second match. Survives reloads and new sessions, so recipes use it
pathsYesAbsolute file paths
browserNochrome, edge, ... (only when several browsers are connected)
snapshotNoDefault returns a diff of what changed. true = full snapshot, false = nothing

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations exist, so the description carries the full behavioral burden. It does disclose that attachment works either through a file input or by targeting an upload button ref, but says nothing about whether it waits for the upload to finish, how multiple paths are handled, what permission/focus state the page must be in, or what a failure looks like.

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 front-loaded sentence with no filler, and the core mechanism is stated first. Its brevity is efficient rather than padded, though it leaves the reader wanting detail that belongs in other dimensions.

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 six-parameter browser-mutation tool with a nested object, no annotations, and no output schema, the one-line description is thin. The rich schema compensates for parameter semantics, but upload-specific behavior (waiting, settling, error surfaces) is unaddressed.

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 six parameters including the nested find object are already documented. The description only loosely ties the 'upload button ref' phrasing to the ref parameter and adds no format, constraint, or interaction detail beyond the schema; baseline 3 applies.

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 local files') plus the two mechanisms it supports (a file input or an upload button ref), which materially distinguishes it from click/type siblings. It stops short of naming an alternative tool, so it lands at a clear-but-not-differentiated 4.

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 only implied: an agent can infer this is the tool for file attachments, but there is no explicit when-to-use vs when-not guidance, no mention of prerequisites, and no routing to siblings such as click or choose for the surrounding interaction.

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