Skip to main content
Glama

k8s_describe_node

Retrieve comprehensive Kubernetes node details including resource capacity, allocatable resources, system conditions, and taints for infrastructure management and troubleshooting.

Instructions

Get detailed node info including capacity, allocatable resources, conditions, and taints

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesNode name

Implementation Reference

  • The handler function 'describeNode' which queries the Kubernetes API for detailed node information.
    export async function describeNode(args: Record<string, unknown>): Promise<string> {
      const api = getCoreV1Api();
      const name = args.name as string;
    
      if (!name) throw new Error("Node name is required");
    
      const response = await api.readNode(name);
      const node = response.body;
    
      const allocatable = node.status?.allocatable || {};
      const capacity = node.status?.capacity || {};
    
      const lines: string[] = [
        `Name:         ${node.metadata?.name}`,
        `OS:           ${node.status?.nodeInfo?.osImage || "?"}`,
        `Kernel:       ${node.status?.nodeInfo?.kernelVersion || "?"}`,
        `Runtime:      ${node.status?.nodeInfo?.containerRuntimeVersion || "?"}`,
        `Kubelet:      ${node.status?.nodeInfo?.kubeletVersion || "?"}`,
        "",
        "Capacity:",
        `  CPU:         ${capacity.cpu || "?"}`,
        `  Memory:      ${capacity.memory || "?"}`,
        `  Pods:        ${capacity.pods || "?"}`,
        "",
        "Allocatable:",
        `  CPU:         ${allocatable.cpu || "?"}`,
        `  Memory:      ${allocatable.memory || "?"}`,
        `  Pods:        ${allocatable.pods || "?"}`,
        "",
        "Conditions:",
      ];
    
      for (const cond of node.status?.conditions || []) {
        lines.push(`  ${cond.type}: ${cond.status} — ${cond.message || ""}`);
      }
    
      const taints = node.spec?.taints || [];
      if (taints.length > 0) {
        lines.push("", "Taints:");
        for (const taint of taints) {
  • The definition and input schema for the 'k8s_describe_node' tool.
    {
      name: "k8s_describe_node",
      description: "Get detailed node info including capacity, allocatable resources, conditions, and taints",
      inputSchema: {
        type: "object" as const,
        properties: {
          name: { type: "string", description: "Node name" },
        },
        required: ["name"],
      },
    },
  • The switch case that dispatches the 'k8s_describe_node' tool name to its handler implementation.
    case "k8s_describe_node": return describeNode(a);

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/batu-sonmez/infraclaude'

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