Skip to main content
Glama

file_upload

Upload files directly to a file input element on the page using its reference ID, avoiding the native file picker dialog.

Instructions

Upload one or multiple files to a file input element on the page. Do not click on file upload buttons or file inputs -- clicking opens a native file picker dialog that you cannot see or interact with. Instead, use read_page or find to locate the file input element, then use this tool with its ref to upload files directly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYesElement reference ID of the file input from read_page or find tools (e.g., "ref_1", "ref_2").
filesNoFiles to upload, as base64-encoded bytes.
pathsNoDEPRECATED. Use `files` instead.
tabIdYesTab ID where the file input is located. Use tabs_context first if you don't have a valid tab ID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
provenanceNo
interactionReceiptNo
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It reveals the key pitfall: clicking on file upload buttons/inputs opens a native dialog the agent cannot interact with, and that direct upload via ref is the intended method. It does not discuss other behaviors such as file size limits or event triggering, but the output schema covers return values.

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, front-loaded with the action, and every sentence contributes value. The first sentence states the function, the second gives essential guidance and a warning.

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 a 100% schema coverage and an output schema, the description sufficiently covers the tool's usage: it tells the agent how to obtain the ref, what to avoid, and how to perform the upload. It does not leave major gaps for the agent to invoke the tool 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?

Schema coverage is 100%, so the baseline is 3. The description adds no additional parameter semantics beyond what the schema provides; it only references 'ref' conceptually, which the schema already defines. The 'files' and 'paths' parameters are not elaborated in the description.

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 uses a specific verb ('upload') with a clear resource ('file input element on the page') and scope (one or multiple files). It also distinguishes from sibling tools by explicitly instructing not to click the file input button, which would open a native picker, and directing to use read_page/find to locate the element first.

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?

It provides explicit when-to-use guidance: locate the file input with read_page or find, then use this tool with the ref. It also tells what to avoid (clicking), which is crucial for the agent. While it doesn't enumerate alternative upload tools, the context of file inputs makes the usage unambiguous.

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/sylin-org/ghostlight'

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