Skip to main content
Glama

Upload files

upload_file

Attaches local files from absolute paths to a specified file input element, enabling automated uploads when a page requires file selection.

Instructions

Attaches local files (absolute paths on this machine) to a file input element.

Input Schema

NameRequiredDescriptionDefault
refYesElement ref from page_snapshot or find, e.g. "e12".
pathsYesFiles to attach.
tabIdNoTab to act on. Defaults to the session target tab (see tab_select).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true, so the write nature is covered. The description adds the useful constraint that paths must be absolute local machine paths, but says nothing about whether existing attachments are replaced or appended, nor about error behavior when the ref is not a file input.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler; the key constraint (absolute local paths) sits in the main clause. It is efficient, though slightly terse for a mutation tool with 3 parameters.

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?

For a simple three-parameter mutation with full schema coverage and no output schema, the description covers the essentials. It omits attach-vs-replace semantics and failure modes, which an agent would want when the upload doesn't visibly take effect.

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 all three parameters are already documented (ref origin, absolute paths, tabId default). The description reinforces the path format requirement but adds no syntax or constraint detail beyond what the schema states.

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?

States a specific verb (attaches) and resource (local files) plus the target (a file input element), and clarifies the path form as absolute paths on this machine. An agent can tell this apart from fill_form or click without inspecting the schema, though it doesn't name the sibling it supersedes for file inputs.

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 phrase 'to a file input element' implies the precondition (the target must be a file input), but there is no explicit when-to-use vs. alternatives such as fill_form or click, and no note on what to do if the element is not a file input.

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