Skip to main content
Glama

get_current_activity

Retrieve the foreground app's package and activity on an Android device to identify the active application.

Instructions

Return the currently focused activity/package (foreground app).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/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 full burden, but the verb 'Return' at least implies a non-mutating read with no side effects. It says nothing about what happens when no app is focused, whether a locked/asleep screen affects the result, or how the optional device serial is resolved.

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 short, front-loaded sentence with zero filler; the core resource is named immediately and nothing is repeated from the schema or annotations.

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?

An output schema exists, so return values need no explanation, and the tool is a simple read. However, the undocumented serial parameter and the unspecified behavior when no foreground activity exists leave meaningful gaps for a tool whose whole job is device-scoped state lookup.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the single parameter (serial, nullable, default null) is never referenced in the description. The agent gets no explanation of whether omitting serial targets the default device or all connected devices, which is exactly the gap the description should close.

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?

States a specific verb ('Return') and a clearly scoped resource ('currently focused activity/package (foreground app)'), with a parenthetical that removes any ambiguity about what 'activity' means. It does not explicitly differentiate itself from lookalike siblings such as get_state, app_status, or list_processes, so it stops short of a 5.

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?

The description gives no when-to-use guidance and never names an alternative, so an agent must infer that this is the lightweight foreground-app query versus app_status or get_state. There is also no mention of the multi-device condition that the serial parameter implies.

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