Skip to main content
Glama

android_prepare

Prepare an Android app for testing by granting usage-stats and overlay permissions, POST_NOTIFICATIONS, and optionally enabling an accessibility service. Safe to call repeatedly.

Instructions

Grant the special permissions that pm grant cannot, so an app is actually testable.

Sets usage-stats and overlay appops, grants POST_NOTIFICATIONS, and optionally enables an accessibility service. Safe to call repeatedly.

Args: package: App package id, e.g. com.example.app device: Device serial; defaults to the first physical device. accessibility_service: Fully-qualified service, e.g. com.x/.service.MyService

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceNo
packageYes
accessibility_serviceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals that it sets specific appops and permissions, optionally enables an accessibility service, and is safe to call repeatedly. It does not mention potential prerequisites (e.g., device connectivity, app installation) or the return value, but the core side effects are clearly stated. The repeated-call safety note adds practical value.

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 compact and front-loaded. The first line states the core purpose, the second lists concrete actions and safety, and the args block provides per-parameter clarity. There is no redundancy or filler—every sentence serves a purpose.

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 tool with no output schema and sparse annotations, the description covers the essential aspects: what it does, what it sets, and parameter meanings. It omits details like return value or setup requirements, but these are less critical for a permission-granting tool. Overall, an agent can reasonably infer how to invoke it correctly.

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?

Schema coverage is 0%, so the description must explain all three parameters. It does so effectively: 'package' with an example, 'device' with a default behavior, and 'accessibility_service' with a fully-qualified service example. This goes beyond the bare parameter names and adds practical guidance, though it could benefit from noting format constraints or validation rules.

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 states a clear verb ('Grant'), a specific resource ('special permissions that pm grant cannot'), and enumerates the exact permissions it sets (usage-stats, overlay appops, POST_NOTIFICATIONS, optional accessibility service). It is unambiguous and distinguishes itself from all sibling tools, which deal with emulator control, UI interaction, or device info rather than permission management.

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 explicitly frames when to use it: when `pm grant` cannot grant the needed permissions, to make an app testable. It also notes that it is safe to call repeatedly, which implies idempotency. It does not list alternative tools or explicit 'when not to use' cases, but given the unique scope and clear purpose, the context is sufficient for an agent to select it appropriately.

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