Skip to main content
Glama

list-clusterroles

Retrieve and display all Kubernetes cluster roles to manage access control and permissions across your cluster.

Instructions

List Kubernetes cluster roles

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list-clusterroles' tool. It executes the kubectl command 'kubectl get clusterroles -o wide' and returns the output as text content or a fallback message if no output.
    case "list-clusterroles": { const cmd = `kubectl get clusterroles -o wide`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No cluster roles found" }] }; }
  • The tool definition including name, description, and empty input schema (no parameters required) used for tool listing and validation.
    { name: "list-clusterroles", description: "List Kubernetes cluster roles", inputSchema: { type: "object", properties: {} }
  • server.js:1392-1394 (registration)
    Registration of the tool list handler, which returns the full tools array containing 'list-clusterroles' for tool discovery.
    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