Skip to main content
Glama

get_subject_permissions

Read-only

Retrieve effective RBAC permissions for any Kubernetes subject: ServiceAccount, User, or Group. See which bindings grant access and whether a ServiceAccount is over-privileged, including inherited group memberships.

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
namespaceNonamespace (required for ServiceAccount, omit for User/Group)
nameYessubject name
Behavior5/5

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

Disclosures beyond annotations: returns bindings, rule list, Pods for SAs, and inherited grants with field marking. No contradiction with readOnlyHint=true.

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?

Description is thorough yet efficient, with each sentence contributing value. Slightly long but well-organized and front-loaded.

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 no output schema, description fully explains return structure (bindings, rules, Pods) and edge cases, making the tool's behavior clear for a complex subject.

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 already covers parameters; description adds nuance about namespace requirement per subject kind, providing extra clarity beyond schema descriptions.

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 retrieves effective RBAC permissions for a Kubernetes subject, distinguishing it from sibling tools that focus on resources, events, or logs.

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?

Provides explicit use cases (over-privilege check, permission explanation, blast radius) and parameter guidance (namespace required for ServiceAccount, omit for User/Group), helping the agent decide when to use this tool.

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