Skip to main content
Glama
appium

MCP Appium

Official
by appium

generate_locators

Read-only

Generate locators for all interactable elements on the current page, providing element info and locator suggestions for debugging and inspection.

Instructions

Generate locators for all interactable elements on the current page. [PRIORITY 3: Use this for debugging/inspection or when you need comprehensive element info with locator suggestions]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdNoSession ID; defaults to the active session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.95.0
    • changedInput schema / properties / sessionId / description
      Previous value: -"Session ID to target. If omitted, uses the active session."New value: +"Session ID; defaults to the active session."
  2. First observedv1.92.11

TDQS

A4/5.0
Behavior3/5

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

The readOnlyHint annotation already covers safety, and the description adds the useful scope 'all interactable elements' and 'current page.' It does not go further into output format, cost/performance, or session requirements, which would add value beyond the annotations.

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 plus a compact usage/priority tag. Every phrase earns its place, and the priority guidance is separated cleanly from the core definition.

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

Completeness4/5

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

For a read-only tool with one optional parameter and no output schema, the description supplies the essential behavior and return concept ('locator suggestions'). It is slightly thin on what the returned locator data looks like, but it is otherwise complete enough to invoke correctly.

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%; the only parameter, sessionId, is already documented with 'defaults to active session.' The tool description adds nothing about parameters, so the baseline of 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 opens with a specific verb and resource: 'Generate locators for all interactable elements on the current page.' This distinguishes it from sibling tools like appium_find_element (which targets a single element) and appium_get_page_source (which returns raw source rather than locator suggestions).

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 bracketed guidance states concrete use cases: 'debugging/inspection' or needing 'comprehensive element info with locator suggestions.' It does not name alternatives or explicitly state when not to use it, but the context is clear enough for an agent to route to it.

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