Skip to main content
Glama

upload_files

Upload local files to a file input by providing a CSS selector and absolute paths, bypassing JavaScript's read-only restriction on input.files.

Instructions

Set files on a file input, which JS cannot do (input.files is read-only). Give a CSS selector for the and absolute local paths. Runs as a single CDP batch so the DOM node ids stay valid across the sequence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYes
timeoutNo
selectorYes
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral transparency burden. It adds useful detail by disclosing the CDP batch mechanism and why it matters (DOM node ids stay valid), and it clarifies that the tool only sets files rather than submitting. However, it does not discuss failure behavior, path accessibility, or event side effects.

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?

Three sentences, front-loaded with purpose, then selector/path requirements, then the batching detail. Every sentence earns its place and there is no wasted wording.

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?

The tool has an output schema, so return handling is covered elsewhere, and the description supplies the purpose, required input semantics, and a key reliability guarantee. The only missing context is for the optional timeout and session_id parameters and edge-case behavior such as path validity or event triggering.

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?

Despite 0% schema description coverage, the description adds real meaning: selector is a CSS selector for an <input type=file> and paths must be absolute local paths. It covers both required parameters well, though timeout and session_id are not explained beyond their schema defaults.

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?

The description opens with a concrete action and resource: 'Set files on a file input', and it explains why the tool exists ('input.files is read-only'). This makes the tool's niche immediately clear and distinguishes it from sibling tools like execute_js or download_file.

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?

It gives clear conditions: use this when you need to populate a file input with absolute local paths, and it frames the tool as the workaround for JS's file-input limitation. It does not explicitly name sibling alternatives or state when not to use it, but the context is strong enough for routing.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LinVireo/browsertap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server