Skip to main content
Glama
yinnho

AginxBrowser

session_set_files

Programmatically select files on a hidden file input: supply base64 content, filename, and MIME type; assigns File objects to input.files and fires input/change events to trigger onChange handlers.

Instructions

Select files on a file input programmatically (Playwright setInputFiles semantics): builds File objects from base64 content, assigns them to input.files, then dispatches input+change so framework onChange handlers fire. Selector-addressed because file inputs are often hidden and absent from the session_state index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesFiles to select
selectorYesCSS selector for the file input, e.g. "input[type=file]". File inputs are often hidden, so this is selector-addressed rather than using the /state index.
session_idYesSession ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations provide only a title, so the description carries the behavioral burden. It transparently discloses the full mechanism: builds File objects from base64, assigns them to input.files, and dispatches input+change events so framework onChange handlers fire. It does not mention failure modes or return behavior, but the core side effects are clear.

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 compact sentences front-load the purpose, then efficiently explain the mechanism and the selector rationale. Every clause adds value, with no redundant or filler content.

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?

For a three-parameter tool with complete schema coverage and no output schema, this description gives enough behavioral context for correct invocation: the selector approach, event dispatch, and framework-handler implications. It does not cover return values or failure conditions, but that is a minor gap given the detailed mechanism already provided.

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 schema already documents all parameters and nested fields. The description adds a useful rationale for the selector parameter and confirms the base64 construction path, but it does not materially extend the schema's parameter documentation.

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?

States a specific action—'Select files on a file input programmatically'—and anchors it to Playwright setInputFiles semantics. It also distinguishes itself from state-indexed sibling tools by explaining that file inputs are often hidden and absent from the session_state index, so selector addressing is required.

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

Usage Guidelines4/5

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

Clear context is provided: this tool is for attaching files to file inputs, and it explains why selector addressing is used instead of the session_state index. It does not explicitly name an alternative or give when-not-to-use conditions, but the intended scenario is readily inferable.

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