Skip to main content
Glama

Upload files to a file input

file_upload

Upload local files to a browser file input by element ref using absolute local paths; requires debugger tier, and cross-site frames must be opened in their own tab.

Instructions

Set local files on a identified by ref (from read_page/find), via the debugger. Pass absolute local paths. Works for any file type including images. Requires the debugger tier (yellow 'debugging this browser' banner). A file input inside a cross-site frame runs in its own process, out of the debugger's reach: the call fails with an error that says so; open that frame's page in its own tab and upload there.

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

Input Schema

NameRequiredDescriptionDefault
refYesFile-input element ref from read_page/find
pathsYesAbsolute local file paths to upload
tabIdYesTarget tab ID (must be in the MCP group)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.24.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the tier requirement, the absolute-path constraint, that any file type including images works, and that cross-site-frame uploads fail with a self-describing error. It omits whether existing files are replaced and whether change/input events fire.

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?

The core action is front-loaded in the first clause, followed by path format, capability, prerequisite, and the failure/workaround case. Every sentence adds information and none is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter mutation tool with no output schema, the description covers prerequisites, constraints, and the main failure mode with a remedy. The remaining gap is what the agent should expect on success (confirmation or return value).

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 the schema already defines ref, paths, and tabId. The description's parameter-related statements (ref from read_page/find, absolute paths, tab in the MCP group) largely restate schema text, adding little new meaning; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and target: "Set local files on a <input type=file> identified by ref ... via the debugger." It also tells the agent where the ref comes from (read_page/find), so the action and its input source are unambiguous 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear prerequisite (debugger tier, yellow 'debugging this browser' banner) and an explicit when-not case with a workaround for cross-site frames. It does not contrast this with the sibling upload paths (file_drop, upload_image), so alternative selection is left to the agent.

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