Skip to main content
Glama

file_upload

Upload files to a file input element using a11y-tree ref for visible inputs or CSS selector for hidden inputs. Provide absolute file path(s) for single or multiple files.

Instructions

Upload file(s) to a file input element. Provide ref or CSS selector to identify the , and absolute path(s) to the file(s).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoA11y-Tree element ref (e.g. 'e8') — preferred when input is visible in view_page
selectorNoCSS selector (e.g. 'input[type=file]') — use this for hidden file inputs (display:none, off-screen). Many React/Vue apps render a visible custom button that triggers a hidden <input type=file>; the hidden input is NOT in the a11y-tree, so ref won't find it. Pass the selector instead.
pathYesAbsolute file path(s) to upload. String for single file, array for multiple files.
Behavior4/5

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

No annotations are provided, so the description alone must convey behavioral traits. It states the upload action and the required file paths, but does not mention whether the file is immediately selected or if form submission is needed. However, the core behavior is clear and no contradictions exist.

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 description is two sentences long, each serving a distinct purpose. The first states the main action and required inputs; the second provides guidance on parameter choice. No redundant or irrelevant information.

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?

Given no annotations, no output schema, and a straightforward use case, the description covers the essential behavioral details and parameter usage. It could mention the lack of automatic form submission, but overall it is adequate for an agent to use the tool correctly.

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?

Schema description coverage is 100%, so baseline is 3. The description adds value by explaining the ref vs. selector distinction beyond the schema's descriptions, clarifying when each is appropriate. This elevates the score to 4.

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 clearly states the verb ('Upload'), resource ('file(s) to a file input element'), and the two identification methods (ref or CSS selector). It distinguishes this tool from siblings like 'download' or 'capture_image'.

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?

The description explicitly explains when to use 'ref' (visible input in view_page) vs 'selector' (hidden file inputs, as in many React/Vue apps). This provides clear context and alternatives, making it easy for the agent to choose correctly.

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/Silbercue/public-browser'

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