Skip to main content
Glama

ui.set_text

Inputs text into a specified Android UI component, or the focused input field when no selector is set, clearing existing text by default.

Instructions

精确输入到指定组件(优先 ACTION_SET_TEXT;无 selector 时输入到聚焦框)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pkgNo
textYes
clearNo
selectorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

B3.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose the preferred underlying action and the no-selector fallback, which is genuine behavioral context. But for a mutation tool it stays silent on critical traits: whether existing content is overwritten (clear defaults to true), permissions, and failure modes.

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?

A single compact sentence with the mechanism and fallback front-loaded; no filler. It is arguably a touch too terse for a four-parameter mutation tool, but nothing is wasted.

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?

With no annotations, no output schema, and zero schema description coverage across four parameters, the description only addresses element targeting. The destructive default of clear and the role of pkg remain undocumented, leaving an agent unable to predict the tool's effect on existing input content.

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

Parameters2/5

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

Schema coverage is 0% for four parameters. The description explains selector semantics and the fallback when it is absent, which is real added value, but says nothing about clear (default true, i.e. whether existing text is wiped), pkg, or the text payload format.

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?

States a specific verb+resource: precisely input text into a designated component. It further names the underlying mechanism (ACTION_SET_TEXT) and the fallback target (the focused field), which distinguishes it from sibling input tools. No explicit sibling naming, but the action is unambiguous.

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?

The description tells the agent how targeting resolves (selector present vs. absent), which implies when this tool applies. However, it never states when to prefer ui.set_text over input.key or input.clipboard, nor any preconditions such as the element being visible.

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