Skip to main content
Glama

ACTION_INPUT_TEXT

Writes text into Android input fields for automation, optionally submits it with Enter, and can target fields by coordinates when focus is not reported.

Instructions

输入文字:写入输入框,可选输入后回车提交(需无障碍(mode=shell/ime 需 Shizuku 或 root))。输出:input_success。a11y 模式会读回输入框核对内容。shell/ime 的 input text 打不出中文等非 ASCII 字符。QQ/微信等输入框点过后常不报告焦点,传 target 坐标才写得进去。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。

Input Schema

NameRequiredDescriptionDefault
modeNoa11y=无障碍写入(未生效时退回剪贴板粘贴,中文可用);shell/ime=shell `input text`(默认 a11y)
textNo要输入的文字,支持 ${var};为空时须 submit=true(只提交)或 allow_empty=true(清空)
submitNo输入后触发 IME 回车(搜索/发送);优先无障碍 IME_ENTER,不支持时退回 shell keyevent 66(默认 false)
targetNo"x,y" 坐标:定位包含该点的输入框并先聚焦(a11y 写入和 submit 用,shell/ime 写入不看它);不传用当前焦点输入框。支持 ${var}
requireNo执行后要求为 true 的变量名(如 click_success),不满足按出错处理
on_errorNo节点出错时:skip=跳过继续(默认),stop=停止整个工作流
allow_emptyNo允许 text 为空时把输入框设为空串(清空)(默认 false)
node_timeout_msNo单节点超时毫秒,0=不限;默认 30 分钟

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does substantial work: it discloses the return value (input_success), that a11y mode reads back to verify content, the privilege requirement for shell/ime, the non-ASCII limitation, and the focus-reporting quirk. It does not say whether typed text replaces or appends to existing content, which is a meaningful behavioral gap for an input tool.

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?

Purpose and output are front-loaded, then caveats follow in a compact sequence. It is dense and mostly earns its sentences, though there is minor clutter such as a stray double period and a slightly run-on mode/parenthesis clause.

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 an 8-parameter, 3-mode action with no output schema, the description covers output name, verification behavior, platform prerequisites, non-ASCII limits, and interpolation. The main missing piece is the replace-vs-append semantics of the text parameter.

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 explains every parameter and the baseline is 3. The description adds a little (mode requirements, why target matters, ${var} interpolation applied to all string parameters) but mostly restates what the schema already documents.

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?

Opening clause gives a specific verb+resource (write text into an input box) plus the optional submit behavior, so the agent immediately knows what the tool does. It never names a sibling such as ACTION_CLICK or ACTION_TEXT_OPERATION to draw a boundary, so it stops short of full differentiation.

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?

Gives concrete selection guidance: use a11y mode for Chinese/non-ASCII, shell/ime only when Shizuku or root is available, and pass target coordinates for QQ/WeChat inputs that do not report focus. No explicit exclusions or named alternative tools are given, so it is clear context rather than a full when/when-not rule set.

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