list-nodes
Retrieve a list of all Kubernetes nodes in your cluster to monitor resource availability and manage workloads effectively.
Instructions
List all Kubernetes nodes
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list-nodes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:1441-1447 (handler)The execution handler for the 'list-nodes' tool. It runs the kubectl command 'kubectl get nodes -o wide' and returns the stdout output as text content.
case "list-nodes": { const cmd = `kubectl get nodes -o wide`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No nodes found" }] }; } - server.js:69-74 (schema)The tool schema definition for 'list-nodes', including name, description, and input schema (no required parameters). This is part of the tools list returned by the ListToolsRequestHandler.
name: "list-nodes", description: "List all Kubernetes nodes", inputSchema: { type: "object", properties: {} } - server.js:1392-1394 (registration)The ListToolsRequestHandler that registers all tools, including 'list-nodes', by returning the complete tools array.
server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });