app_grant
This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET
Grant an app's permissions up front, so a first-launch permission dialog never appears to block the flow. "all" grants everything the app declares. Names are cross-platform (all, bluetooth, calendar, camera, contacts, location, location-always, media-library, microphone, motion, notifications, phone, photos, photos-add, reminders, siri, sms); a platform name like "android.permission.CAMERA" also works. On Android the result is verified by reading the permission state back, because pm grant reports success for permissions the app never declared.
Changes the device, the app or the session: readOnlyHint is false.
Arguments
| Name | Type | Required | What it is |
|---|---|---|---|
app | string | yes | Package name on Android or bundle id on iOS. |
device | string | Device serial to target, e.g. "emulator-5554". Omit when only one device is running. | |
driver | string: uiautomator2, uiautomator, wda | Driver to use: "uiautomator2" (default for Android; fast, installs a server APK on first use), "uiautomator" (Android, installs nothing, slower, cannot type), or "wda" (WebDriverAgent: iOS simulators and iPhones). | |
permissions | array of string | yes | Permission names, or ["all"]. |
Examples
Each is the arguments of a tools/call request; the first is shown whole.
Grant two permissions before a flow
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "app_grant",
"arguments": {
"app": "com.example.shop",
"permissions": [
"camera",
"location"
]
}
}
}