Skip to main content
Glama

analyze_screen

Capture and classify mobile UI elements from live iOS/Android screens into forms, CTAs, and tab bars, generating candidate test cases from the view hierarchy.

Instructions

Mobile 版的 analyze_url:透過 maestro hierarchy dump 當前 iOS Simulator / Android Emulator / 實體機 / BlueStacks(透過 QA_ANDROID_HOST)前景 app 的 view tree,再分類成 form(具 hint_text 的輸入欄位)、cta(enabled + 有文字的可點元件)、tab_bar(selected 狀態 + 同 y 對齊的 2+ 個 tab)三種 modules 並附 candidate_tcs。內建 noise filter 自動排除 iOS 狀態列 + asset 命名標籤(bg_* / *_filled / 純數字 / 單一 ASCII 字元等)讓結果信號集中。需 Maestro CLI 已裝、裝置 booted、app 已在前景。若給 app_id + launch_app=true,會先用 launchApp 啟動再 dump。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idNo選填,bundle id (iOS) / package name (Android),格式如 `com.example.app`。搭配 launch_app=true 使用,或為了在輸出標註是分析哪個 app。
launch_appNo搭配 app_id:True 時在 hierarchy dump 前用 maestro launchApp 啟動 app。用 clearState: false(保留 app 狀態),確保看到「真實」起始畫面。省略則假設裝置上 app 已是當前前景。
timeout_msNo選填,hierarchy 命令超時毫秒。預設 30000;BlueStacks / 遠端 ADB 較慢,QA_ANDROID_HOST 有設時會自動拉到 60000 起跳。
Behavior4/5

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

In the absence of annotations, the description thoroughly discloses the tool's behavior: it dumps the hierarchy, classifies modules, applies noise filtering, and requires specific operational conditions. It also explains the launching behavior with clearState: false. This provides good transparency beyond the schema.

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?

The description is a single paragraph but packs substantial information efficiently. It is front-loaded with the main purpose and then details. While slightly dense, it avoids unnecessary verbosity and is structured logically.

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

Completeness5/5

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

Given the tool's complexity and the lack of an output schema, the description is highly complete. It explains what the tool returns (hierarchy, classified modules, candidate_tcs), lists prerequisites, and covers optional behaviors comprehensively. No significant gaps remain.

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

Parameters5/5

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

The input schema has 100% coverage with descriptions for all three parameters. The description adds significant context: app_id is used for launching or labeling, launch_app details the exact behavior (clearState: false), and timeout_ms adjusts for BlueStacks. This goes beyond what the schema provides.

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 clearly identifies the tool as a mobile version of analyze_url, specifying that it dumps the view tree of the current foreground app on a mobile device, classifies UI elements into forms, CTAs, and tab bars, and filters noise. It differentiates from the sibling analyze_url by explicitly stating 'Mobile 版的 analyze_url'.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool, including prerequisites (Maestro CLI installed, device booted, app in foreground) and options to launch the app. It does not explicitly mention when not to use it or list alternatives, but the context is sufficient for selecting the tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kao273183/mk-qa-master'

If you have feedback or need assistance with the MCP directory API, please join our Discord server