Skip to main content
Glama

Click Webview Element by Text

webview_click_text
Destructive

Click the outermost visible element containing specified text in a mobile webview. Specify device and visible text to automate Android and iOS webview interactions.

Instructions

按可见文本点击 webview 内元素(找最外层匹配且可见者)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes元素可见文本
deviceYes目标设备 serial(同 mobile_list_available_devices 的 id)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already disclose destructiveHint=true, and the description adds a meaningful selection behavior: it chooses the outermost matching visible element. This goes beyond what the schema or annotations provide. It does not address edge cases like missing text or multiple matches, but the added context is valuable.

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 compact sentence that front-loads the primary action ('click by visible text') and immediately clarifies the selection rule. There is no redundant or filler content; every clause carries distinct information.

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

Completeness3/5

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

For a simple two-parameter tool with complete schema coverage and a destructive annotation, the description covers core behavior and selection logic. However, it omits any mention of prerequisites (e.g., a connected webview) or failure behavior, which the schema and annotations do not provide. This is adequate but not exhaustive.

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?

The schema description coverage is 100%, so both parameters ('text' and 'device') are already fully documented. The description adds no additional parameter-level meaning beyond what the schema states, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('click') and target ('webview element by visible text'), and adds a precise selection rule ('outermost matching and visible'). This clearly distinguishes it from coordinate-based clicks (mobile_click_on_screen_at_coordinates) and other webview operations (evaluate, screenshot, etc.).

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 implies usage when an agent needs to click a webview element via its visible text, but it does not explicitly state when to prefer this over alternatives, nor does it mention exclusions or prerequisites (e.g., needing an active webview connection). Guidance is inferred rather than explicit.

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