Skip to main content
Glama

Inspect Adb Window

inspect_adb_window
Idempotent

Read an Android device's current window focus to identify the foreground app or window at read time, without interaction or changes.

Instructions

Report the window manager's current focus declarations (dumpsys window windows: mCurrentFocus and mFocusedApp) — what is on screen at read time without any interaction. Read-only.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "serial": "emulator-5554"
    },
    "name": "inspect_adb_window"
  }
}

Input Schema

NameRequiredDescriptionDefault
serialYesDevice serial exactly as `adb devices` reports it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior2/5

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

The description contributes real behavioral context: the exact dumpsys subcommand, the two fields returned, and the fact that no on-device interaction occurs. But it explicitly asserts "Read-only" while the annotations declare readOnlyHint=false, a direct conflict on the one property an agent uses to decide whether a call is safe; destructiveHint=false and idempotentHint=true partially corroborate the read-only claim, so the description's underlying behavior is likely right and the metadata is likely a default, but the mismatch is unresolved in the text.

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?

One sentence, front-loaded with the verb and resource, with the command and returned fields in parentheses and the interaction-free nature appended. Nothing is redundant or padded.

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 diagnostic tool with no output schema, the description does the important work: it states what data comes back (focus fields) and that no interaction is triggered. The only gap is the unresolved read-only claim versus readOnlyHint=false, which an agent would want settled before calling.

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?

There is a single required `serial` parameter and schema description coverage is 100%, with the schema already specifying the exact `adb devices` format and a validation pattern. The description adds nothing about the parameter, which is acceptable at full coverage but leaves no margin for improvement.

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?

Names a specific verb ("Report") and a precise resource (the window manager's current focus declarations), then enumerates exactly which fields are returned (mCurrentFocus and mFocusedApp) and which underlying command produces them. An agent can distinguish this from capture_adb_screen or inspect_adb_display without opening any schema.

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

Usage Guidelines3/5

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

The description conveys implied usage — "what is on screen at read time without any interaction" — which tells an agent this is the cheap way to learn foreground state. However, it never names an alternative (e.g., a screen-capture or display-inspection sibling) or states when not to use it, so routing still requires inference.

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

Deploy Server

Other Tools