Skip to main content
Glama

list-rolebindings

View Kubernetes role bindings to manage access permissions in a specific namespace, helping administrators audit and control cluster security.

Instructions

List Kubernetes role bindings in a namespace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceNoThe namespace to list role bindings from (optional, defaults to current context namespace)

Implementation Reference

  • Handler implementation for the 'list-rolebindings' tool. Executes 'kubectl get rolebindings -o wide' with optional namespace flag and returns the stdout as text content.
    case "list-rolebindings": { const { namespace } = args || {}; const nsArg = namespace ? `-n ${namespace}` : ""; const cmd = `kubectl get rolebindings ${nsArg} -o wide`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No role bindings found" }] }; }
  • Schema definition for the 'list-rolebindings' tool, including input schema for optional namespace parameter. This is part of the tools array used for tool listing and validation.
    name: "list-rolebindings", description: "List Kubernetes role bindings in a namespace", inputSchema: { type: "object", properties: { namespace: { type: "string", description: "The namespace to list role bindings from (optional, defaults to current context namespace)" } } }
  • server.js:1392-1394 (registration)
    Registration of the tools list handler, which returns the array containing the 'list-rolebindings' tool schema when ListToolsRequest is called.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { 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/thekaranpargaie/kube-mcp'

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