get-cluster-metrics
Retrieve cluster-wide metrics from Kubernetes to monitor resource usage, performance, and health across all nodes and workloads.
Instructions
Get cluster-wide metrics
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:2204-2210 (handler)Handler implementation that executes kubectl command to fetch raw cluster node metrics from the metrics API.case "get-cluster-metrics": { const cmd = `kubectl get --raw /apis/metrics.k8s.io/v1beta1/nodes`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "Unable to get cluster metrics" }] }; }
- server.js:1316-1322 (schema)Tool schema definition including name, description, and empty input schema for get-cluster-metrics.name: "get-cluster-metrics", description: "Get cluster-wide metrics", inputSchema: { type: "object", properties: {} } },
- server.js:1392-1394 (registration)Registration of all tools list handler, which includes get-cluster-metrics in the tools array.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });