Skip to main content
Glama

device.grant_permissions

Grant Android runtime permissions to a specific app package, enabling automated testing and resolving permission-related issues during development.

Instructions

[approval required][device mutation][risk:dangerous] Grant one or more Android runtime permissions to a package.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialNo
packageNameYes
permissionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0-alpha.14

TDQS

B3.3/5.0
Behavior3/5

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

Annotations are entirely absent, so the description must carry the burden. The brackets '[approval required][device mutation][risk:dangerous]' add critical behavioral context: the operation mutates the device and is dangerous, requiring explicit approval. This is valuable beyond what the schema provides. However, it does not disclose what happens on failure (e.g., if permission already granted, invalid permission name, permission not requestable), nor whether the grant is permanent or session-limited, nor if re-granting is idempotent. This is a partial disclosure.

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?

The description is a single concise sentence that front-loads the risk markers before the action. It is efficient with no filler. The only minor flaw is that the risk markers could be seen as redundant with the action itself, but they still add value. The description earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema, no annotations, and zero schema description coverage, so the description must fully specify behavior. It falls short: it does not explain what the success/failure response looks like (e.g., whether a JSON with granted permissions is returned), whether the operation is idempotent, on which Android versions this works, what permission format is expected (full string vs shorthand), or how 'serial' is used. For a dangerous device mutation with no annotations, this is a significant gap that could lead an agent to call it incorrectly.

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 0%, meaning the description must compensate for undocumented parameters. The description states 'one or more Android runtime permissions' which clarifies that 'permissions' is an array of runtime permission strings (e.g., android.permission.CAMERA), and 'packageName' is the target package. However, it does not explain 'serial' at all – whether it optionally targets a specific device or is required for multi-device setups. As a result, description partially compensates but leaves a gap.

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 clearly states the action (grant), the resource (Android runtime permissions to a package), and the required target package. It is distinct from sibling device mutation tools like install/uninstall/clear_app_data, so purpose is clear. The description does not name alternatives but the verb+resource is specific.

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?

The description includes brackets indicating approval is required and that it is a device mutation with dangerous risk, which implicitly tells the agent to use caution and presumably ask for approval. However, it does not say when to use this tool versus alternatives or when NOT to use it (e.g., when a permission is already granted, or for non-runtime permissions). Context is implied but not explicit.

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