Skip to main content
Glama
invidtiv
by invidtiv

Get current foreground activity

android.activity.current

Retrieve the currently focused Android app's activity and package name to identify which application is running in the foreground on a connected device.

Instructions

Retrieves the currently focused/resumed activity and package name. Useful for determining which app is in the foreground. Returns package name and activity name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly describes what the tool returns ('package name and activity name') and its read-only nature is implied by 'retrieves.' However, it doesn't mention potential limitations like requiring ADB debugging to be enabled, device connectivity requirements, or error conditions.

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 perfectly concise with three sentences that each earn their place: the first states the core function, the second provides usage context, and the third specifies the return values. It's front-loaded with the main purpose and contains zero wasted words.

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 single-parameter tool with no annotations and no output schema, the description provides good coverage of purpose, usage, and return values. It adequately explains what the tool does and what information it provides. The main gap is the lack of explicit parameter explanation, but the simplicity of the tool makes this less critical.

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

Parameters4/5

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

The input schema has 1 parameter with 0% description coverage, so the description must compensate. While it doesn't explicitly mention the 'serial' parameter, the description implies device-specific operation through context ('foreground activity'), and having only one parameter makes the tool straightforward. The description adds value by explaining what information is retrieved, though it could better explain the parameter's purpose.

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 clearly states the specific verb ('retrieves') and resource ('currently focused/resumed activity and package name'), making the purpose explicit. It distinguishes this tool from siblings by focusing on foreground activity detection rather than device management, app control, or UI interaction tools in the sibling list.

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?

The description provides clear context about when to use this tool ('useful for determining which app is in the foreground'), which implicitly distinguishes it from sibling tools that perform different functions like file operations or input simulation. However, it doesn't explicitly mention when not to use it or name specific alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/invidtiv/mcp-scrcpy-vision'

If you have feedback or need assistance with the MCP directory API, please join our Discord server