Skip to main content
Glama

adb_current_activity

Retrieves the currently focused Android activity and window stack to identify which app or screen is active on a connected device.

Instructions

Get the currently focused activity and window stack

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "adb_current_activity"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceNoDevice serial

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv1.1.3
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv1.1.1

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden alone. It does say exactly what is retrieved (focused activity plus the window stack), which is the key behavioral trait for a read-only diagnostic query, but it says nothing about failure modes (no device connected, ambiguous device when omitted), required permissions, or whether the output is truncated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short, front-loaded sentence with zero filler; the core resource is stated immediately. It is a bit thin rather than bloated, which is a completeness issue rather than a conciseness flaw.

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

Completeness3/5

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

With no annotations and no output schema, the description is the only source of return-shape information, and it only gestures at 'window stack' without saying what structure or fields come back. For a simple one-parameter read tool this is minimally adequate but leaves real gaps.

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 optional parameter (device) and the schema already documents it at 100% coverage, so the baseline of 3 applies. The description adds no meaning beyond the schema, e.g. what happens when device is omitted and multiple devices are attached.

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 gives a specific verb ("Get") and a specific resource ("currently focused activity and window stack"), which is concrete enough to distinguish it from generic siblings like adb_shell or adb_dumpsys. It stops short of naming the closest alternatives (adb_ui_dump, adb_screen_state, adb_top), so an agent still has to infer the boundary.

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?

There is no when-to-use or when-not-to-use guidance, and no mention of the sibling tools that report overlapping UI state (adb_ui_dump, adb_ui_find, adb_screen_state, adb_dumpsys). The agent must guess whether this is the right tool for 'what screen am I on' questions.

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