GrantPermissionTool
class GrantPermissionTool(shell: ShellBackend, policy: ShellPolicy = ShellPolicy.RECOMMENDED) : McpTool
pm grant <pkg> <perm> — grant a runtime permission to an app without the user prompt. Idempotent. The permission must be one the app declared in its manifest. Treated as failure if the command exits non-zero or writes to stderr (not declared / not a runtime permission / etc.). Note pm grant also grants development-protection permissions such as WRITE_SECURE_SETTINGS; permissions in ShellPolicy.deniedPermissions are refused with denied_by_policy.
Privilege: requires a working ShellBackend.
Params: package_name (required), permission (required, fully-qualified).
On success the result map carries success (true), package_name, and permission.