Skip to main content
Glama

file_upload

Upload files to a webpage's file input using an element reference or CSS selector. Provide absolute file paths to complete the action.

Instructions

Upload file(s) to an identified by ref or CSS selector; file paths must be absolute.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoElement ref of the file input
pathYesAbsolute path(s) of the file(s) to upload
selectorNoCSS selector of the file input; needed for hidden inputs (display:none, off-screen), which have no ref

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed5 schema fields changedv2.10.5
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / path / description
      Previous value: -"Absolute file path(s) to upload. String for single file, array for multiple files."New value: +"Absolute path(s) of the file(s) to upload"
    • changedInput schema / properties / ref / description
      Previous value: -"A11y-Tree element ref (e.g. 'e8') — preferred when input is visible in view_page"New value: +"Element ref of the file input"
    • changedInput schema / properties / selector / description
      Previous value: -"CSS 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."New value: +"CSS selector of the file input; needed for hidden inputs (display:none, off-screen), which have no ref"
  2. First observedv2.7.0

TDQS

B3.3/5.0
Behavior2/5

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

There are no annotations, so the description carries the full burden of behavioral disclosure. It only restates the upload action and the absolute-path requirement, which is already in the schema. It does not disclose side effects, event behavior, handling of hidden inputs, or what happens on failure.

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?

A single well-structured sentence that front-loads the action and target, then adds the critical path constraint. No wasted words.

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

Completeness3/5

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

The schema fully documents all three parameters, so a valid call can be constructed. However, with no annotations and no output schema, the description does not clarify behavioral expectations, error conditions, or when selector is needed versus ref, leaving some contextual gaps for an agent.

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 description coverage is 100%, so the baseline is 3. The description adds little beyond the schema: it mentions ref/CSS selector and absolute paths, both of which are already documented in the parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Upload') and a clear resource ('<input type="file">'), and identifies targeting via ref or CSS selector. It is clear and distinct from siblings like click/type, but it does not explicitly name an alternative or contrast itself with fill_form, so it stops short of a top-tier differentiation.

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

Usage Guidelines3/5

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

The usage is implied: use this tool when uploading files to a file input. The absolute-path requirement is a useful prerequisite, but there is no explicit guidance about when to prefer this over fill_form/type or any exclusion criteria.

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

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