Skip to main content
Glama

upload_file

Attach local files to a browser file input as if the user selected them, enabling agents to submit forms that require file uploads.

Instructions

Attach local files to a file input, as if the user picked them.

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

Input Schema

NameRequiredDescriptionDefault
refYesElement ref from the latest snapshot, e.g. "e14".
tabNoTab handle from list_tabs, e.g. "chrome:812". Optional when only one tab is shared.
pathsYesAbsolute paths on this machine.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. The clause 'as if the user picked them' does valuable work — it signals the tool triggers the page's normal change/input events rather than silently setting a value — but it says nothing about what happens if the target is not a file input, whether files must exist on disk, whether the OS picker is bypassed, or how failures are surfaced.

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 zero filler; the action and the actor-simulation semantics are both packed into eleven words. Nothing is repeated from structured fields and nothing could be cut without losing meaning.

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?

With three parameters, full schema coverage, and no output schema, the definition is close to sufficient, but a mutation-adjacent tool with no annotations should mention that it requires a current snapshot ref and an existing file input. Failure behavior and post-upload state are left entirely 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 'ref', 'tab', and 'paths' are already documented with examples and the optionality of 'tab'. The description adds the word 'local', which loosely reinforces that paths are machine-local, but contributes no format, ordering, or multi-file semantics beyond the schema.

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?

The description names a specific verb and resource — 'attach local files to a file input' — which is unambiguous and implicitly contrasts with the download_file sibling. It stops short of explicitly differentiating itself from any named alternative, but an agent can tell what it does without opening the schema.

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 must infer that the page needs an existing file input element and that 'ref' should come from a snapshot. There is no statement of when not to use it, no prerequisite checklist, and no pointer to alternatives for other upload mechanisms.

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