Skip to main content
Glama

Upload files

upload

Attach local files to a browser file input by supplying one or more paths; resolve relative paths from the current directory and expand ~ for home paths.

Instructions

Attach local files to a file input. Paths are resolved from the current directory; ~ is expanded.

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. Preferred over selectors.
nameNoAccessible name to combine with role.
roleNoARIA role, e.g. button, link, textbox, checkbox, combobox.
textNoVisible text to match (first match wins).
exactNoRequire exact text/name match.
pathsYesLocal file paths.
confirmNoConfirm a high-impact action when the server policy is ask.
observeNoReturn a compact change observation after the action (default true).
selectorNoCSS selector (use when no ref is available).

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 supply only readOnlyHint=false, so the description carries most of the burden. It usefully discloses path resolution semantics (cwd-relative, ~ expansion), but omits mutation-relevant behavior such as whether existing file selections are replaced, whether input/change events fire, and whether the action 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?

Two short sentences with no filler: the action first, then the path-resolution caveat. Nothing is redundant and nothing buries the key information.

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 9 parameters, a fully documented schema, and no output schema, most calling details are already covered structurally. However, for a mutating browser action with only a readOnlyHint annotation, the description leaves behavioral gaps (event dispatch, replacement semantics, whether confirm/observe defaults matter) unaddressed.

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 100%, so the baseline is 3; the description earns above baseline by clarifying that paths are resolved from the current directory and that ~ is expanded, which is genuine meaning the schema's "Local file paths" does not convey.

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?

"Attach local files to a file input" gives a specific verb (attach) and resource (file input), which is clearly distinct from fill/type/click siblings. It stops short of naming an alternative or stating that it bypasses the native file picker, so it is clear but not sibling-differentiating.

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 by the purpose sentence: you use this when a file input needs files. There is no explicit when-to-use guidance versus fill/click, no note about prerequisites (does the input need to be visible/enabled?), and no exclusions.

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