Skip to main content
Glama

extract-locators

Extract mobile app UI element locators from XML source to identify components for automation testing with Appium.

Instructions

Extract element locators from UI XML source

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlSourceYesXML source to analyze
elementTypeNoFilter elements by type (e.g., android.widget.Button)
maxResultsNoMaximum number of elements to return
Behavior2/5

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

With no annotations, the description carries full burden but provides minimal behavioral insight. It doesn't disclose output format (e.g., list of locators, structured data), error conditions (e.g., invalid XML), performance traits (e.g., processing time for large sources), or side effects (likely none, but unspecified). The phrase 'extract' implies read-only analysis, but this isn't explicitly confirmed.

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 zero wasted words. It directly states the tool's function without redundancy or fluff, making it highly efficient for quick comprehension by an AI agent.

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 tool with 3 parameters, no annotations, and no output schema, the description is insufficient. It lacks details on return values (critical for 'extract' operations), error handling, and integration with sibling tools (e.g., how it complements 'get-page-source'). Given the complexity of UI testing contexts, more guidance is needed for effective agent use.

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 100%, so parameters are well-documented in the schema. The description adds no additional semantic context beyond implying analysis of XML for locators, which is already inferred from the tool name. It doesn't explain parameter interactions (e.g., how elementType filtering works with maxResults) or provide examples, so baseline 3 is appropriate.

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 clearly states the verb ('extract') and resource ('element locators'), specifying the source ('from UI XML source'). It distinguishes from some siblings like 'capture-ui-locators' (which likely captures live UI) and 'generate-element-locators' (which may generate rather than extract), but doesn't explicitly contrast with all relevant alternatives like 'get-element-tree' or 'inspect-element'.

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 on when to use this tool versus alternatives is provided. The description doesn't mention prerequisites (e.g., needing XML source from 'get-page-source' or 'save-ui-hierarchy'), nor does it clarify use cases like static analysis versus dynamic inspection, leaving the agent to infer context from sibling tool names alone.

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/Rahulec08/appium-mcp'

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