Skip to main content
Glama

Scale replica set

k8s_scale_replica_set

Adjust a Kubernetes ReplicaSet to a specified replica count in a namespace so workload capacity matches demand, optionally targeting a named multi-context pool.

Instructions

Scale a ReplicaSet to the specified number of replicas.

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>",
      "replicas": "<replicas>"
    },
    "name": "k8s_scale_replica_set"
  }
}

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.
replicasYes
namespaceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true and destructiveHint=false, so the mutation and cluster-facing nature is known. The description adds nothing beyond that: it does not say existing pods are deleted when scaling down, that scaling a ReplicaSet owned by a Deployment is typically reverted by the controller, or that an HPA may override the value. For a scaling mutation those are the exact behavioral facts an agent needs.

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

Conciseness4/5

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

One short sentence, front-loaded with the verb and resource, with zero filler or repetition. Its terseness is a virtue structurally, though it leaves the definition under-specified overall.

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

Completeness4/5

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

Not a 4 — correcting: for a write tool with no output schema, three required params and a 25% documented schema, the description is materially incomplete. It omits the owner/HPA caveats, the effect on running pods, and any disambiguation from the duplicate cm_k8s_workloads_scale_replicaset tool, all of which an agent needs before invoking a cluster mutation.

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 description coverage is only 25% — just the 'context' parameter is documented; name, namespace and replicas have bare types with no descriptions. The description only restates 'specified number of replicas' and never clarifies replicas=0 semantics, whether namespace defaults, or how name/namespace must be scoped. With low coverage, the description needed to compensate and does not.

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 states a specific verb and resource — scaling a ReplicaSet — plus the target quantity, so the operation is immediately legible. It does not differentiate itself from the near-identical sibling cm_k8s_workloads_scale_replicaset (or k8s_scale_deployment / k8s_scale_statefulset), so an agent cannot tell from the text alone which of the overlapping scale tools to pick.

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 statement of prerequisites (ReplicaSet must already exist and be named), and no mention of when to prefer this over the cm_k8s_workloads_scale_replicaset sibling. The agent is left to infer applicability purely from the name.

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