Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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" }]
      };
    }
  • 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 };
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states 'Get' which implies a read operation, but doesn't disclose behavioral traits such as whether this requires specific permissions, what format the metrics are returned in, if there are rate limits, or if it's a real-time or aggregated view. The description is minimal and leaves critical operational details unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just three words, front-loaded with the core action and resource. There's no wasted language, and it efficiently communicates the basic purpose without unnecessary elaboration, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of cluster metrics (which could include CPU, memory, network, etc.) and the lack of annotations and output schema, the description is incomplete. It doesn't specify what metrics are returned, their format, or any behavioral context. For a tool that likely provides detailed data, this minimal description leaves too many gaps for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter semantics, but that's acceptable here since there are no parameters to explain. A baseline of 4 is appropriate as the schema fully covers the absence of parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get cluster-wide metrics' clearly states the action (get) and resource (cluster-wide metrics), but it's vague about what specific metrics are included. It distinguishes from obvious siblings like 'get-node-metrics' and 'get-pod-metrics' by specifying 'cluster-wide', but doesn't clarify how it differs from other metric-related tools like 'analyze-resource-usage' or 'top-nodes'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. With many sibling tools that might provide overlapping or related functionality (e.g., 'get-node-metrics', 'get-pod-metrics', 'analyze-resource-usage', 'top-nodes'), the description lacks any indication of context, prerequisites, or comparisons to help the agent choose appropriately.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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