Skip to main content
Glama
andresolbach

nodriver-mcp-server

Upload file

upload_file

Attach a local file to a file input without triggering the OS file-picker dialog, avoiding automation halts on sites with hidden upload controls.

Instructions

Attach a local file to a file input on the page.

Sets the input's files directly over CDP, so no OS file-picker dialog ever opens — clicking an upload button normally would open one, and that blocks every further tool call until a human dismisses it.

Many sites hide the real behind a styled button or drop zone. It is still in the snapshot; if you cannot spot it, locate it with query_selector("input[type=file]").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesuid of the <input type="file"> element, from the most recent take_snapshot. It must be the file input itself, not the styled button or drop zone layered over it.
file_pathYesAbsolute path to a local file on the machine running this server.
include_snapshotNoAppend a fresh page snapshot to the response. Worth it when this action changes the page and take_snapshot would be your next call anyway — it saves a round trip, at the cost of a much larger response.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description discloses that files are set directly over CDP, preventing dialog opening, and warns that clicking an upload button normally opens a dialog that blocks agent execution. It also explains that hidden inputs are still in the snapshot and how to find them. This goes well beyond the annotations (readOnlyHint=false, openWorldHint=true) and adds valuable operational context.

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 compact paragraphs, each earning its place: purpose, key CDP behavior, and a practical tip for hidden inputs. No redundant text, front-loaded with the main point.

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 moderately complex tool with an output schema, the description covers core usage, the main pitfall (dialog blocking), and the hidden-input case. It also mentions include_snapshot for efficiency. Nothing essential is missing for an agent to invoke it correctly.

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?

The schema already covers all parameters with detailed descriptions (e.g., uid must be the file input itself, file_path is absolute). The description reinforces the uid guidance but doesn't add significant new semantic value. With 100% schema coverage, a baseline of 3 is appropriate.

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 clear, specific action: 'Attach a local file to a file input on the page.' It precisely identifies the resource (file input) and the verb (attach), distinguishing it from sibling tools like fill or type_text, which are for text fields. The title and description align perfectly.

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 explains when to use this tool (for file uploads) and why it is preferable: it avoids the OS file-picker dialog that can block all further tool calls. It also provides a concrete fallback for tricky pages: locate the hidden input with query_selector("input[type=file]"). It doesn't explicitly name alternatives, but the guidance is clear enough for an agent to decide.

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

Install Server

Other Tools

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/andresolbach/nodriver-mcp-server'

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