Skip to main content
Glama

Drain node

k8s_drain_node

Evict all pods from a Kubernetes node to prepare it for maintenance or decommissioning, with optional force and grace-period controls.

Instructions

Safely evict all pods from a node (drain).

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": {
      "node_name": "<node_name>"
    },
    "name": "k8s_drain_node"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNo
confirmNoExplicitly confirm this destructive operation. Needed only when the client cannot answer a confirmation prompt.
contextNoNamed context of the multi-context pool to run against (see cm_multi_context list_contexts); the default context if omitted.
node_nameYes
grace_period_secondsNo

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 only declare readOnlyHint=false and openWorldHint=true, and notably destructiveHint=false, so the description must carry real behavioral weight. It says nothing about what happens to pods not managed by a controller, whether DaemonSet/mirror pods are skipped, whether the node is left cordoned afterward, or when the 'confirm' prompt will fire — all critical for a disruptive operation.

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?

A single front-loaded sentence with zero filler, which is structurally clean. It is arguably too terse for a five-parameter disruptive tool, but there is no wasted wording.

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?

For a high-impact node-level mutation with five parameters, 40% schema coverage, no output schema and only weak annotations, the one-line description leaves the agent without the information needed to invoke it safely (preconditions, confirmation behavior, force semantics).

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 40% (confirm and context are documented; node_name, force and grace_period_seconds are bare). The description adds no meaning for any parameter — notably it never explains that 'force' bypasses the safety check for unmanaged pods or how grace_period_seconds affects eviction.

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?

States a specific verb and resource (evict pods from a node) and glosses it with the canonical term 'drain', so the agent knows exactly what the operation is. It does not, however, distinguish itself from near-siblings like k8s_cordon_node or k8s_uncordon_node, which are the most likely confusions.

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 precondition (e.g. that a node is typically cordoned first so it stops receiving new pods), and no mention of alternatives such as cordon-only maintenance. The agent must infer the operational context entirely.

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