Skip to main content
Glama

Get Current App

get_current_app

Retrieve the package name and activity name of the foreground app on a mobile device to identify what the user is currently viewing.

Instructions

Get the package name and activity name of the app that is currently in the foreground on the device. Useful for determining what the user is currently looking at.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idYesDevice serial ID
Behavior3/5

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

With no annotations provided, the description carries full burden. It states what the tool returns (package and activity name) but does not disclose any side effects, permissions needed, or edge cases (e.g., what happens on lock screen or if no app is foreground). It is minimally transparent.

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?

The description is two sentences long, no wasted words. Front-loads the purpose and adds a brief usage context. Could be slightly improved by removing the generic 'useful for' phrase, but overall concise.

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?

Given the tool is simple (1 param, no output schema, no nested objects), the description is largely complete: it explains what is returned and a key use case. It lacks details about potential errors or permissions, but these are less critical for a read-only information retrieval tool.

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% for the single parameter 'device_id' which is described as 'Device serial ID'. The description does not add any extra meaning beyond what the schema already provides, so baseline of 3 is appropriate.

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 it gets the package name and activity name of the foreground app, which is a specific verb+resource. It distinguishes itself from sibling tools like 'get_device_info' or 'list_apps' by focusing on the current foreground app.

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 mentions it is useful for determining what the user is looking at, which implies when to use it, but does not provide explicit alternatives or conditions for other tools that might provide similar information (e.g., 'get_ui_elements' might also infer the current app). No exclusion criteria or when-not-to-use guidance.

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/saranshbamania/mobile-device-mcp'

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