googleapis / googleapis/gcloud-mcp
feat(gcloud-mcp): add check_iam_permissions tool
- Dominant language
- TypeScript
- Stars
- 904
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Description
## Feature: Add `check_iam_permissions` tool
### Problem
AI agents often encounter "permission denied" errors when running gcloud commands. Currently there's no easy way to proactively check if the user has the necessary permissions before attempting an operation.
### Solution
Add a `check_iam_permissions` tool that tests whether the authenticated account has specific IAM permissions on a project.
### Use Cases
- Verify permissions BEFORE running a command to avoid errors
- Debug "permission denied" errors by checking which permissions are missing
- Validate access to a specific project
### Implementation
- Uses `gcloud projects test-iam-permissions` under the hood
- Returns a clear summary of granted/denied permissions
- Provides helpful suggestions when permissions are missing
Related to #169 (reduce IAM errors)
Contributor guide
Assessment
This issue has not been assessed yet.