Skip to main content
Glama

drain_node

Destructive

Cordon a Kubernetes node and evict its pods for maintenance; skips DaemonSet and mirror pods, with dry-run preview before irreversible evictions.

Instructions

[WRITE][risk=high] Cordon a node and evict its pods. HIGH RISK — no full undo.

DaemonSet-managed and mirror pods are skipped (like kubectl drain). The cordon is reversible (uncordon_node); the evictions are not. Pass dry_run=True to preview without draining.

Args: name: Node name (see node_list). dry_run: If True, preview without cordoning or evicting. target: k8s target name from config.

Input Schema

NameRequiredDescriptionDefault
nameYes
targetNo
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, yet the description adds substantial context beyond them: no full undo, cordon-is-reversible-but-evictions-are-not, and explicit skipping of DaemonSet-managed and mirror pods (matching kubectl drain). This is exactly the extra behavioral detail the annotations cannot convey.

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?

Risk tag and IRREVERSIBILITY note are front-loaded before mechanics, then behavior, then a compact Args block. Every sentence (skipped pod types, reversibility split, dry_run) carries decision-relevant information with no filler.

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

Completeness5/5

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

For a high-risk destructive operation with no output schema, the description covers the safety profile, the preview escape hatch (dry_run), reversibility boundaries, and workloads excluded from eviction. Nothing an agent needs before invoking this dangerous tool is missing.

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?

Schema description coverage is 0%, so the description must compensate, and it does: name points to node_list, dry_run explains the preview-without-draining behavior, and target is identified as the k8s target name from config. All three params gain meaning, though no format/enum detail is added for target.

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

Purpose5/5

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

States a specific compound action (cordon a node and evict its pods) with the resource named, and clearly distinguishes this from the reversible cordon_node/uncordon_node siblings by noting the eviction half is irreversible. An agent can tell drain_node apart from cordon_node and delete_pod without opening any schema.

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

Usage Guidelines4/5

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

Gives clear operational context: the cordon is reversible via uncordon_node while evictions are not, and dry_run=True previews without draining. It stops short of an explicit 'use this when... instead of...' routing statement, but the reversal/preview guidance effectively tells the agent when and how to use it safely.

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