Skip to main content
Glama

Revoke permission

revoke_permission
DestructiveIdempotent

Revoke an Android app's runtime permission to test denied access or re-trigger the permission-request dialog on next use; useful alongside granting permissions for permission-flow testing.

Instructions

Revoke a runtime permission from an app (pm revoke) — to test the denied path or re-trigger the permission-request dialog on next use. Pairs with grant_permission. Note: revoking some permissions kills the app process.

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": {
      "package": "<package>",
      "permission": "<permission>"
    },
    "name": "revoke_permission"
  }
}

Input Schema

NameRequiredDescriptionDefault
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
packageYesApplication package name.
permissionYesFull permission name, e.g. android.permission.CAMERA.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered structurally. The description adds genuinely new behavioral context the annotations cannot convey: that revoking certain permissions kills the app process, which directly affects how an agent should sequence subsequent steps. It does not describe the response shape, but with no output schema and the key side effect flagged, this is a strong contribution.

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?

Two short sentences plus a one-line caution, with the action front-loaded and the purpose and pairing packed into the first sentence. Nothing is padding; the process-kill warning earns its sentence because it changes agent behavior.

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 three-parameter tool with full schema coverage and no output schema, the description covers what is needed: what it does, why to call it, its complement, and its most dangerous side effect. The only gap is what happens when the permission was never granted (error vs. silent no-op), which would be nice but is not essential to invoke it correctly.

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%, so package, permission, and the optional device serial are already documented in the schema, including the permission-name format example. The description adds no additional meaning about parameter formats, defaults, or interactions, so the baseline 3 applies.

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 gives a specific verb and resource ('Revoke a runtime permission from an app') plus the underlying mechanism ('pm revoke'), and it names the sibling it is the inverse of ('Pairs with grant_permission'). An agent can distinguish it from grant_permission and from unrelated app-lifecycle tools without opening any schema.

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 states concrete situations for use — testing the denied permission path or forcing the permission-request dialog to reappear on next use — and points to the complementary tool grant_permission. It stops short of explicit when-not guidance (e.g., revoking a permission the app never declared), but the positive guidance is clear enough to select the tool.

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