Skip to main content
Glama

Upload files

file_upload

Set files on an element by ref to local file paths, as if the user picked them, so you can test uploads or attach files in a Firefox browser session.

Instructions

Set the files of an element (by ref) to local file paths, as if the user picked them. Use computer screenshot save_to_disk to upload a screenshot.

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

Input Schema

NameRequiredDescriptionDefault
refYesRef of the file input.
pathsYesAbsolute paths of local files.
tabIdYesTab ID from tabs_context / tabs_create.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.3/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 behavioral burden. It implies a page-state mutation resembling a user file pick, but says nothing about whether a change/input event is dispatched, whether existing selections are replaced, what happens with an invalid or stale ref, or whether the paths must exist and be readable. For a DOM-mutating tool with zero annotation coverage this is a meaningful gap.

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 compact sentences, front-loaded with the core action, followed by a single actionable pointer. No redundant restatement of the title and no filler.

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, no-output-schema tool, the description conveys the essential action and one useful workflow link. It leaves out the behavioral details an agent would want before calling it: error conditions for bad refs, event side effects, and whether the file input must be enabled or visible.

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, paths, and tabId are already documented in the schema. The description restates 'by ref' and 'local file paths' without adding format details such as whether paths are absolute or relative, whether multiple files are allowed on a non-multiple input, or where the ref comes from. 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?

Names a specific verb and resource: setting the files of an <input type=file> element identified by ref, to local absolute paths. The phrase 'as if the user picked them' pins down the semantics precisely. It doesn't explicitly contrast with sibling form_input, which handles ordinary form fields, so an agent must infer that boundary.

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?

Gives one concrete routing hint – use computer screenshot save_to_disk first when the goal is uploading a screenshot – which implies the tool expects a file already on disk. There is no guidance on when NOT to use it (e.g. for text inputs use form_input), no prerequisites like the element being present or visible, and no note about the page needing to be on the correct tab.

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