Skip to main content
Glama

adb_permission_audit

Audit runtime permission grants for an Android package, list granted dangerous permissions by category, and flag over-provisioned access against the manifest.

Instructions

Audit runtime permission grants for a package. Lists all granted dangerous permissions grouped by category (Camera, Location, Phone, SMS, etc.) and flags potentially over-provisioned permissions. Compares grants against the dangerous permission manifest to identify unnecessary access.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "packageName": "<packageName>"
    },
    "name": "adb_permission_audit"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceNoDevice serial
packageNameYesPackage name to audit (e.g., 'com.example.app'). AZ7 fix: enforces Java-identifier shape so injection attempts are rejected at the schema layer before reaching validateShellArg.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed3 schema fields changedv1.1.3
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / packageName / description
      Previous value: -"Package name to audit (e.g., 'com.example.app')"New value: +"Package name to audit (e.g., 'com.example.app'). AZ7 fix: enforces Java-identifier shape so injection attempts are rejected at the schema layer before reaching validateShellArg."
    • addedInput schema / properties / packageName / pattern
      Added value: +"^[a-zA-Z][a-zA-Z0-9_]*(\\.[a-zA-Z][a-zA-Z0-9_]*)+$"
  3. First observedv1.1.1

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description must carry the behavioral burden. "Audit" and "Lists" imply a read-only inspection with no side effects, and the description usefully discloses the comparison against the dangerous permission manifest, but it never states read-only-ness, permission/root requirements, or failure behavior.

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?

Three sentences, each carrying information: what is audited, how results are grouped, and what is flagged. Front-loaded with the verb and resource, with no filler or restatement of the tool name.

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?

With no output schema, the description does a fair job of describing the return shape (grants grouped by category, over-provisioning flags). However, for an analysis tool it omits prerequisites, how 'unnecessary access' is determined, and whether results are per-device or aggregate, leaving gaps an agent would want filled.

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% and both parameters are documented in-schema, including the package-name pattern. The description adds no additional meaning about packageName or the optional device serial, so the baseline of 3 applies.

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?

The description names a specific verb and resource ("Audit runtime permission grants for a package") and spells out the analysis performed: grouping by category and flagging over-provisioned grants. This separates it conceptually from plain listing siblings such as adb_list_permissions, though it never names that sibling explicitly.

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?

Usage is only implied by the word "Audit" and the notion of over-provisioning; there is no explicit statement of when to prefer this over adb_list_permissions, whether the package must be installed, or what happens if the package is absent. An agent can infer the intent but gets no routing guidance.

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

Deploy Server

Other Tools