Skip to main content
Glama

android_ui_set_text

Destructive

Replaces text in an editable Android UI element matching a selector, using an optional index to target specific instances.

Instructions

Replace text in the Nth editable accessibility element matching a selector.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
indexNo
valueYes
viewIdNo
enabledNo
visibleNo
editableNo
classNameNo
clickableNo
descriptionNo
packageNameNo
textContainsNo
caseSensitiveNo
descriptionContainsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

B3/5.0
Behavior3/5

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

Annotations already mark the tool as destructive and non-read-only. The description adds the useful precondition that the target must be editable and that text is replaced, but it does not disclose failure modes, side effects, or reversibility beyond what the annotations imply.

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 front-loaded sentence with no filler. It succinctly states the action and target, making every word earn its place.

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 destructive tool with 14 parameters and no output schema, this description is too thin. It omits how to build a selector, what the required 'value' means, what happens if no element matches or is non-editable, and what the return behavior is.

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 description coverage is 0%, so the description must compensate, but it only vaguely mentions a 'selector' and 'Nth'. It fails to clarify the role of the required 'value' parameter versus the 'text' parameter, nor does it explain the filtering parameters. This ambiguity is a significant gap.

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 uses a specific verb and resource – 'Replace text' in an editable accessibility element – which conveys the core action clearly. However, it does not explicitly differentiate from sibling tools like android_input_text, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool instead of alternatives such as android_input_text or android_ui_click. The description implies selector-based targeting but never states the conditions that make this tool the right choice or excludes alternatives.

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