Skip to main content
Glama

upload_file

Upload local files to browser file inputs using Chrome DevTools Protocol, bypassing the invisible native file picker that would hang the renderer.

Instructions

Attach a local file to a page's via Chrome DevTools Protocol — use this for ALL browser uploads (logos, images, docs).

The sandbox's native GTK file picker is invisible to us AND hangs the renderer, so never click an upload button expecting a dialog — call this instead. Works on Chromium started by launch_app / start-display.sh (they open a per-instance --remote-debugging-port, 9222+N). selector targets the file input on the MAIN page (default = first file input). If the site only inserts the after you click its 'upload' control, click that first (it won't open a dialog we can see, but it wires up the input), then call this. Returns {"ok", "action", "instance", "detail"}; fails (isError) with the reason if the file is missing, no CDP target answers, or the selector matches nothing. NATIVE (non-browser) apps: use open_file() or drive the app's own Open dialog — it IS visible here. observe/settle_ms: see click().

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
observeNonone
filepathYes
instanceNo
selectorNoinput[type=file]
settle_msNo
Behavior5/5

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

No annotations provided, but description fully covers behavioral traits: uses CDP, requires Chromium started by launch_app, selector targets main page, advises clicking first if input is dynamic, and details return format/failure reasons. Adds context on observe/settle_ms referencing click().

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?

Every sentence adds value: purpose, when to use, how to use, edge cases, return values, and references. Front-loaded with main action. No filler.

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

Completeness5/5

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

Given 5 parameters, no output schema, and no annotations, description provides complete context: prerequisites (Chromium, launch_app), dynamic input handling, return format, failure reasons, and distinction from sibling tools (open_file). No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, description explains each parameter: filepath (required local path), selector (default first input), instance (integer), observe and settle_ms (see click()). Adds meaning beyond the schema definitions.

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?

Description explicitly states the tool attaches a file to a page's file input via CDP, distinguishes from native file picker, and specifies its use for all browser uploads. Verb 'attach' and resource 'file input' are clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicitly advises against clicking upload buttons for dialogs (since native picker is invisible and hangs renderer), prescribes using this tool instead. Also contrasts with native apps: suggests open_file() for visible dialogs. Clear when-not and alternatives.

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/segentic-lab/glovebox-mcp'

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