Skip to content

feat(gcloud-mcp): add check_iam_permissions tool #324

@arnaldo-delisio

Description

@arnaldo-delisio

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions