Skip to main content
Glama

upload-files

Attach staged local files to a file input or browser file chooser so automated form submissions include the intended uploads; the site may begin uploading immediately.

Instructions

Attach staged local files to a file input. Use chooser for a button that opens the browser file chooser. The site may upload the files immediately.

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": {
      "pageId": "<pageId>",
      "selector": "<selector>",
      "fileNames": "<fileNames>"
    },
    "name": "upload-files"
  }
}

Input Schema

NameRequiredDescriptionDefault
viaNoinput
pageIdYes
timeoutNoMaximum action time in milliseconds. Use 0 for no timeout.
selectorYes
fileNamesYesPlain file names from the upload directory. Paths are not accepted.
sessionIdNoBrowser session ID. Defaults to 'default'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations at all, the description carries the full behavioral burden. It does disclose one important trait — "The site may upload the files immediately" warns that the action can be irreversible and side-effectful. It omits permissions, visibility requirements for the target element, failure modes, and whether it waits for the upload to complete.

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?

Three short sentences, front-loaded with the core action and then the mode distinction. No filler or redundant restatement of the name. The final sentence is slightly hedged but still earns its place as a side-effect warning.

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 6-parameter mutation-like tool with no annotations and no output schema, the description is on the thin side, but the schema covers the parameter structure well, and this tool's scope is narrow and self-explanatory.

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 50%, so the schema documents fileNames and timeout but leaves via, pageId, selector, and sessionId undocumented. The description partially compensates by explaining what via="chooser" means, which the bare enum does not convey. The selector and pageId semantics remain entirely schema-only.

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 first sentence gives a specific verb and resource: attach staged local files to a file input. It is immediately distinguishable from generic interaction tools like click or fill. It does not name a sibling tool or explicitly rule one out, keeping it below a 5.

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?

"Use chooser for a button that opens the browser file chooser" gives real selection guidance for the via parameter, which is the main decision point. However, there is no guidance on prerequisites (e.g. that files must first be staged in the upload directory) or on when this tool is preferred over driving the input with click.

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