Skip to main content
Glama
appium

MCP Appium

Official
by appium

appium_get_active_element

Read-only

Retrieve the currently focused or active element in your mobile app session and obtain its UUID for subsequent interactions, enabling targeted automation without prior element lookup.

Instructions

Get the currently active/focused element and return its UUID for follow-up interactions. [PRIORITY 1: Use this first when you need to find what element currently has focus]

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.2/5.0
Behavior4/5

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

The read-only behavior is already covered by annotations, so the description doesn't need to restate that. It adds useful context by specifying that the tool returns a UUID intended for follow-up interactions. It does not mention edge cases like what happens when no element is focused, but that is a minor omission for such a simple read-only tool.

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 two short, efficient components: the purpose first, then the priority usage note. There is no filler, and the key information is front-loaded.

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 one-parameter, read-only tool with safety annotations, the description is nearly complete: it states what is returned (UUID) and why it matters. The only real gap is the lack of guidance on the no-focused-element case, especially given the absence of an output schema.

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 coverage is 100%: the only parameter, sessionId, is already documented as defaulting to the active session. The description adds no parameter-level detail, so the schema carries the semantic load and the baseline 3 is appropriate.

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 uses a specific verb and resource ('Get the currently active/focused element') and states a concrete output ('return its UUID for follow-up interactions'). This clearly distinguishes it from siblings like appium_find_element, which search for elements rather than report the current focus.

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?

It provides explicit usage context: 'Use this first when you need to find what element currently has focus.' This is clear and actionable, but it does not name alternatives or state when not to use it, so it stops short of a 5.

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