Skip to main content
Glama

Foreground

foreground

Retrieve the active Android app's package and activity plus whether a crash dialog is visible; use this lightweight check instead of a full snapshot when that data is all you need.

Instructions

Get just the foreground app: package, activity, and whether a crash dialog is showing. Cheaper than a full snapshot when you only need this.

Input Schema

NameRequiredDescriptionDefault
deviceNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral-disclosure burden. 'Get' implies a read operation, and the description usefully states the exact foreground data returned and frames the tool as cheaper than snapshot; however, it does not explicitly state that it is read-only or discuss permissions, side effects, or the optional device parameter's behavior.

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 two short sentences with no wasted wording. The core purpose and return fields are front-loaded, followed by the snapshot comparison that helps tool selection.

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?

The tool is simple and has an output schema, so the description need not explain return formatting. It is mostly complete for purpose and selection, but the sole parameter, 'device,' is entirely unaddressed, leaving a meaningful gap for invocation.

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?

There is one optional parameter, 'device,' with 0% schema description coverage, so the description would need to compensate. It does not mention the parameter at all, leaving its meaning and default behavior undocumented in both the schema and the description.

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 uses a specific verb and resource: 'Get just the foreground app,' then enumerates exactly what is returned: package, activity, and crash-dialog status. It also distinguishes the tool from the broader snapshot sibling by calling itself cheaper when only foreground information is needed.

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?

It explicitly compares the tool to 'a full snapshot' and states the condition for choosing it: when you only need the foreground app. It does not provide explicit when-not guidance or mention other possible alternatives such as get_device, but the main routing decision is clear.

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