Skip to main content
Glama

set_permissions

Grant or revoke Android runtime permissions by shorthand or full name so app flows can start from a clean install without manual system-dialog taps.

Instructions

Grant or revoke Android runtime permissions, so a flow can start from a clean install without a human tapping the system dialog. Accepts shorthands (camera, location, background_location, storage, media, notifications, microphone, contacts, phone, bluetooth) or full names like android.permission.CAMERA. Android only.

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": {
      "permissions": "<permissions>"
    },
    "name": "set_permissions"
  }
}

Input Schema

NameRequiredDescriptionDefault
grantNoTrue to grant, false to revoke. Default: true
packageNoApp package name (Android, e.g. com.example.app) or bundle ID (iOS). Optional — defaults to the app currently in the foreground.
platformNoTarget platform. Inferred if omitted.
device_idNoDevice ID. Omit for the connected device.
permissionsYesPermissions to change, e.g. ["camera", "location"] or ["android.permission.CAMERA"]

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A4.1/5.0
Behavior3/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false, so the description does useful work by adding the Android-only constraint and the alias-vs-full-name input behavior. However it omits genuinely important behavior for this operation: whether the target app must be installed or foregrounded, whether granting requires an instrumented/test build, and whether revoking disrupts 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and rationale in the first sentence, then the input format, then the platform limitation. The shorthand enumeration is long but functional; nothing is redundant padding, though the list could be trimmed or moved into the schema without losing much.

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 5-parameter mutation with no output schema, the description covers purpose, motivation, accepted input forms, and platform scope adequately. The notable residual gaps are prerequisites for a successful grant and the fact that the schema exposes an iOS platform value and bundle-ID package format while the description declares the tool Android only.

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 description coverage is 100%, so the baseline is 3, but the description earns extra credit by enumerating the accepted shorthand vocabulary (camera, background_location, storage, media, notifications, etc.) and confirming that full names like android.permission.CAMERA are also valid. That goes beyond the schema's brief example array and directly reduces retry-causing mistakes.

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 opens with a specific verb pair and resource: "Grant or revoke Android runtime permissions." It also states the effect (a flow can start from a clean install without a human tapping the system dialog), which makes it immediately distinguishable from device-state siblings like set_location or set_network_state.

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 gives a clear triggering scenario — automating a fresh-install flow past the OS permission dialog — which tells an agent when this tool is the right pick. It stops short of explicit exclusions or naming alternatives (e.g., when to prefer launch_app with pre-granted state, or how it relates to clear_app_data), so it is clear context without full when/when-not guidance.

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