Skip to main content
Glama

ui.text_handle

Write text to Android input fields by handle, clearing existing text by default; uses native set_text for accessibility elements or focuses visual-only elements before typing.

Instructions

按句柄向输入元素写文本(a11y 元素走 set_text 原生通道链;纯视觉元素先点中心聚焦)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
clearNo
handleYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the internal focusing/tapping behavior for pure visual elements, which is non-obvious. However, it omits whether it clears existing text by default (only inferable from the `clear` parameter), what happens on failure, and whether it waits for the keyboard.

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?

One compact parenthetical sentence, front-loaded with the primary action and followed by the two routing cases. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations, no output schema, 0% parameter coverage, and an overlapping sibling, this description is too thin. It should state the `clear` default effect, failure behavior, and how it differs from `ui.set_text`.

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 0% across 3 parameters, so the description must compensate. It clarifies the `handle` and `text` semantics implicitly, but says nothing about the `clear` parameter's default behavior or meaning, leaving a required piece undocumented.

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 states a specific verb+resource ('write text to an element by handle') and even distinguishes two internal routing mechanisms (a11y elements vs visual elements). It lacks explicit differentiation from the sibling `ui.set_text`, which appears to overlap heavily.

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?

It implies when to use it (when you have a handle and want to input text), but it does not state when to use this rather than the sibling `ui.set_text` or `ui.find`. The two-path behavior (set_text native channel vs center-tap focus) is described but not framed as guidance.

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