set_permission
Allow or deny an Electron permission and grant it to the page via Browser.grantPermissions, returning the page's checked permission state. Useful for testing notification, media, or geolocation access.
Instructions
Allow or deny an Electron permission and grant it to the page via Browser.grantPermissions. Returns checked, the page's Notification.permission or equivalent. Requires inspectMain. Unlisted permissions are denied after the handler is installed.
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": {
"permission": "<permission>",
"grant": "<grant>"
},
"name": "set_permission"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grant | Yes | true allows the prompt, false denies it | |
| probe | No | If true, query the page permission state and return it as checked | |
| processId | No | Process ID. If omitted, uses the single running app. | |
| permission | Yes | Electron permission name, e.g. "notifications", "media", "geolocation" |