Skip to main content
Glama

input_text

Types Chinese or Unicode text into an Android input field, optionally focuses it, clears old content, presses Enter, and can return the updated UI tree.

Instructions

极速中文/Unicode 文本输入工具。 可一步完成『聚焦输入框 -> 清空旧内容 -> 注入中文字符串 -> 按回车提交 -> 返回新界面 UI 树』,并自动保护系统原输入法不被篡改。

Input Schema

NameRequiredDescriptionDefault
textYes要输入的文本;UIAutomator2 通道支持中文和 Emoji,不可用时明确返回失败
indexNo可选:输入前先点击聚焦的输入框元素编号 #index
clear_firstNo输入前是否清空原有内容,默认 True
press_enterNo输入完成后是否自动按下回车/搜索键,默认 False
resource_idNo可选:输入前先点击聚焦的输入框 resource-id
hint_or_textNo可选:输入前先点击聚焦的输入框提示词或文本
return_ui_afterNo输入后是否附带完整 UI 树。默认 False——每次重抓全树约 200ms 并吃掉大量上下文;要看结果用 ui_snapshot(since_snapshot_id=...) 只取差异

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations given, the description carries the full load, and it does well: it discloses the multi-step side effects (focus, clear, inject, optional Enter), says the system IME is preserved and not modified, states that the UIAutomator2 channel supports Chinese and Emoji and fails explicitly when it is unavailable, and warns that refetching the full tree costs about 200ms and much context. It does not mention required permissions, what is lost when clear_first deletes existing content, or partial-failure behavior, so it falls short of a 5.

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?

Two compact lines that lead with the core capability and then list the pipeline in execution order. The wording is essentially all substantive, though '极速' is marketing filler with no operational meaning.

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 7-parameter tool with an output schema, the description covers the execution flow, the IME-safety guarantee, the Unicode/Emoji support boundary, and the context cost of the optional UI tree return. The remaining gap is routing guidance versus fill_form and element_action, which keeps it from being complete.

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 every parameter is already documented in the schema, including defaults and the resource_id/hint_or_text/index focusing alternatives. The description adds only the ordering of the composite pipeline, which largely restates what the individual parameters already say. Baseline 3 applies.

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 names a specific verb and resource ('文本输入工具') and spells out the composite action: focus the field, clear it, inject the string, optionally press Enter, return the UI tree. This clearly differs from generic gesture tools. However, it does not say how it differs from siblings such as fill_form or element_action, which also enter text.

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?

There is no explicit statement of when to use this tool, when not to use it, or which sibling to use instead. The only choice guidance is indirect and appears in the return_ui_after parameter: use ui_snapshot(since_snapshot_id=...) rather than refetching the full tree. The default-value cues (clear_first=true, press_enter=false) imply typical usage, but that is inference, not guidance.

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