Skip to main content
Glama

Get autoscaler metrics

k8s_get_autoscaler_metrics
Read-onlyIdempotent

Retrieve metrics for a Kubernetes HorizontalPodAutoscaler by name and namespace to monitor scaling behavior and diagnose autoscaling decisions.

Instructions

Get metrics for a HorizontalPodAutoscaler.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "namespace": "<namespace>"
    },
    "name": "k8s_get_autoscaler_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
contextNoNamed context of the multi-context pool to run against (see cm_multi_context list_contexts); the default context if omitted.
namespaceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

C2.7/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds nothing beyond that: it does not say what metrics are returned, over what time window, or what happens when the autoscaler has no recent samples. With annotations carrying the safety burden, this is a minimal but non-contradictory contribution.

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

Conciseness3/5

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

The single sentence is front-loaded and free of filler, so nothing is wasted. But at this length the terseness is under-specification rather than efficiency; the sentence is too small for the tool's parameter and behavioral surface.

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

Completeness3/5

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

There is no output schema, so the description should at least hint at the shape of the returned metrics, and it does not. Combined with 33% parameter coverage and no usage guidance, the definition is thin for a tool that takes a namespace-scoped named resource plus a context selector.

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

Parameters2/5

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

Schema coverage is only 33%: 'context' is documented in the schema, but 'name' and 'namespace' have no descriptions anywhere. The description does not compensate by explaining that 'name' is the HPA name, that namespace scoping matters, or how the multi-context pool interacts with the target cluster.

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

Purpose4/5

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

The description names a specific verb ('Get') and a specific resource ('metrics for a HorizontalPodAutoscaler'), which is far more informative than the bare tool name. It does not, however, distinguish this from nearby siblings such as k8s_get_autoscaler_history or k8s_get_pod_metrics, leaving the agent to infer which metric source it wants.

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?

There is no when-to-use guidance, no prerequisites (e.g. metrics-server availability), and no mention of alternatives such as the history or set-metrics siblings. The agent must guess the context in which this tool is the right choice.

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

Deploy Server

Other Tools