Skip to main content
Glama

get_subject_permissions

Read-only

Retrieve a Kubernetes subject's effective RBAC permissions, including bindings, rules, and Pods using a ServiceAccount, to identify over-privileged access and blast radius.

Instructions

Get the effective RBAC permissions of a Kubernetes subject (ServiceAccount, User, or Group) — what can this principal do across the cluster. Returns: the bindings that grant access (each pointing at its Role/ClusterRole), a deduplicated flat rule list, and (for ServiceAccounts) the Pods running as this SA. Use this to answer 'is this SA over-privileged?', 'why can X do Y?', or 'what's the blast radius if this Pod is compromised?'. For ServiceAccount, namespace is required. For User/Group, omit namespace (those are external identities, not namespaced resources). Inherited grants from implicit group memberships (system:authenticated, system:serviceaccounts) are included for ServiceAccount subjects with the inheritedFromGroup field set per binding so you can distinguish direct from inherited grants.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYessubject kind: ServiceAccount, User, or Group
nameYessubject name
namespaceNonamespace (required for ServiceAccount, omit for User/Group)
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Even though readOnlyHint is true, the description adds substantial behavioral context: it explains the return structure (bindings, rule list, Pods for ServiceAccounts), the inclusion of inherited grants, and the `inheritedFromGroup` field to distinguish direct from inherited grants. This exceeds the annotation's minimal information.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is reasonably concise for the complexity of the tool, with clear front-loading of purpose and use cases. Each sentence provides relevant information (returns, use cases, parameters, inheritance behavior), but it is slightly dense and could be tightened without losing value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity and lack of output schema, the description fully covers what the tool returns and how to invoke it correctly. It also addresses edge cases (User/Group namespace omission) and inherited permissions, making it complete for an AI agent to select and use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by explaining the conditional requirement for namespace and the distinction between ServiceAccount versus User/Group, which is not fully captured in the schema alone. This justifies a score above baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool gets effective RBAC permissions for a Kubernetes subject, using the specific verb 'Get' and identifying the resource. It distinguishes itself from sibling tools by focusing on RBAC permissions, a unique capability among the listed tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use the tool ('is this SA over-privileged?', 'why can X do Y?', 'what's the blast radius...') and provides parameter-specific guidance (namespace required for ServiceAccount, omitted for User/Group). This gives clear context for invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/skyhook-io/radar'

If you have feedback or need assistance with the MCP directory API, please join our Discord server