Skip to main content
Glama

element_input

Fill values into input elements (input, textarea) using a CSS selector. Supports custom components with innerSelector for nested inputs.

Instructions

向输入类元素(input/textarea 等)填值(element.input())。value 接受字符串或数字。要填自定义组件内部的输入框时,用 selector 定位组件、innerSelector 定位内部输入元素。selector 支持 [index=N] 取第 N 个(0 基,仅作用于 selector)。注意:非输入类元素调用会失败。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYes
selectorYes
connectionNo可选连接覆盖(不传则用默认会话)。可用字段:mode(launch|connect)、cliPath、projectPath、wsEndpoint、timeout、port(【自动化端口】→ cli auto --auto-port,默认 9420;不是 IDE HTTP 服务端口,别把 IDE 服务端口传进来)、account、ticket、trustProject、args、cwd、autoClose、autoLaunch、launchTimeout、connectTimeout。
innerSelectorNo
Behavior4/5

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

With no annotations, the description carries the full burden. It reveals that value accepts string or number, selector supports indexing, and failure occurs on non-input elements. It does not cover error handling for missing elements or whether the operation is additive or overwriting, but the core behavioral traits are disclosed.

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 a single, concise paragraph of about 80 characters. It is front-loaded with the main purpose and every sentence adds value without redundancy. Ideal conciseness.

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?

Given the complexity (4 params, no output schema), the description covers the main usage, special features, and a failure case. It could be more complete by mentioning the return value or supporting additional input types, but it is sufficient for an agent to use correctly in most scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is low (25%), but the description adds meaning for all parameters: explains value types, selector usage with indexing, and innerSelector for custom components. This compensates for the schema gaps. However, more details on connection parameter could be added.

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 clearly states it fills values into input-type elements (input/textarea) using element.input(). It specifies the verb and resource. It distinguishes from sibling tools like element_tap and element_setData by focusing on input elements, but could more explicitly contrast with element_setData which also modifies state.

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?

The description explains when to use: for input-type elements, and provides guidance for custom components using innerSelector. It notes that calling on non-input elements will fail, giving a clear when-not. However, it does not mention alternatives among siblings, which would improve score.

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/Chaixueyuan/weapp-agent-mcp'

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