Skip to main content
Glama

Set App Permission

app_permission
Idempotent

Grant or revoke runtime permissions for Android apps by package name and permission, optionally targeting a specific device serial.

Instructions

Grant or revoke a runtime permission for an app

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>",
      "permission": "<permission>",
      "action": "<action>"
    },
    "name": "app_permission"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYesWhether to grant or revoke the permission
deviceIdNoTarget device serial
permissionYesFull permission name, e.g. 'android.permission.CAMERA'
packageNameYesApplication package name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false, openWorldHint=false, so the safety profile is covered. The description's only added nuance is the word 'runtime', which usefully narrows the scope to runtime permissions rather than manifest edits, but it says nothing about failure modes (permission not declared, app not installed) or whether revoking can break a running app.

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?

A single front-loaded sentence with the action and scope stated first; there is no filler or redundant restatement of the title.

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?

Parameter documentation is complete and annotations carry the safety profile, and no output schema means return values need not be explained. However, for a mutation tool with an optional deviceId, the description gives no hint about defaults or error behavior, leaving the definition just barely adequate.

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 all four parameters, including the action enum and the permission-name format example, are documented inline. The description adds no additional meaning beyond the schema, 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 states a specific verb pair (grant/revoke) and resource (runtime permission for an app), which clearly distinguishes it from the read-only sibling app_permissions_list. It does not explicitly name that sibling as an alternative, but the mutating action verb makes the distinction unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to choose this tool versus app_permissions_list or apk_permissions, and no prerequisites are mentioned (app must be installed, device must be selected or connected, permission must be declared in the manifest). The agent must infer all call conditions from the parameter schema alone.

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