Skip to main content
Glama

Upload File to Matching Input

upload_file
Destructive

Attach local files to any file input field by matching its label or description. Supports both visible and hidden inputs.

Instructions

Attach one or more local files to the file <input> matching description.

Wraps Playwright's set_input_files — works on both visible and hidden file inputs (most modern UIs hide the real input behind a styled label). For drag-drop upload zones that don't have an underlying <input type=file>, this won't work; use drop_file.

Args: description: Match the file input. "file", "upload", or the visible label text. paths: List of absolute paths to files to attach. Single file: pass a one-element list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYes
descriptionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already indicate destructiveHint=true and openWorldHint=true. Description adds that it wraps Playwright's set_input_files and works on hidden inputs, providing useful context beyond annotations. No contradiction; slight gap on side effects or file overwriting not mentioned.

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?

Two short paragraphs with no extraneous content. First paragraph states purpose and mechanism, second lists arguments. Every sentence adds value.

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?

Covers input parameters, alternative tool, and underlying mechanism. Missing explicit mention that paths must be absolute and files must exist, but given output schema exists (not shown), overall adequate. Could be slightly more complete.

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?

Schema coverage is 0%, but description fully explains both parameters: description (how to match input) and paths (list of absolute paths, single file as one-element list). Adds practical value beyond schema structure.

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?

Clearly states it attaches files to a file input element, with specific verb 'attach'. Differentiates from sibling drop_file by specifying it works on file inputs (visible/hidden) and not on drag-drop zones.

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 says when to use (file inputs, visible or hidden) and when not (drag-drop zones without underlying input, use drop_file). Provides practical guidance on description argument: 'file', 'upload', or visible label text.

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/chriswu727/argus'

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