Skip to main content
Glama

Robot Actions — Remote Device Control

device_focus_events

Read recent Android focus-change events from logcat. Useful AFTER a tap on an input field and BEFORE device_type to verify focus actually landed on the expected element — diagnoses the "type went into the wrong field" race that bites parallel tap+type sequences. Filters to ViewRootImpl (window focus), WindowManager (focus transitions), and InputMethodManager (IME show/hide) events. Returns a short summary line followed by the matching logcat lines (newest last). Empty result = no focus events in the recent window, which usually means the tap did NOT change focus (tap missed, or you tapped a non-focusable element).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxNoMax focus events to return (default: 30, capped at 500). Newest last.
udidYesDevice serial number (UDID)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well. It discloses the logcat source, the event categories filtered, the return shape (summary line plus matching lines, newest last), and the semantic interpretation of an empty result. This goes well beyond the structured schema.

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 front-loaded with purpose, then gives usage context, then explains behavior and output semantics. It is longer than average, but every sentence adds distinct value and the structure is logical and scannable.

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?

Despite having no output schema, the description fully specifies what the caller gets back and how to interpret it. Parameter schemas cover the inputs, and the usage context covers when and why to call the tool, making the definition complete for an agent.

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 the schema already documents both parameters (udid and max). The description adds practical context about max default/cap and ordering, but this is modest extra value; the schema does the heavy lifting.

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 starts with a specific verb and resource: 'Read recent Android focus-change events from logcat.' It clearly differentiates the tool's diagnostic purpose from sibling interaction tools by tying it to tap/type verification and naming a concrete sibling sequence (BEFORE device_type).

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

Usage Guidelines5/5

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

The description explicitly states when to use it: AFTER a tap on an input field and BEFORE device_type, to verify focus landed correctly. It also explains the empty-result meaning and common failure causes, giving the agent actionable routing guidance beyond the schema.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources