Skip to main content
Glama

drain_node

Cordon a node and evict its pods to safely remove it from service. Preview with dry_run to check impact before draining.

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

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
targetNo
dry_runNo
Behavior5/5

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

With no annotations, the description fully discloses the write/high-risk nature, partial reversibility, pod-skipping behavior, and dry-run capability. No hidden behaviors remain.

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?

Extremely concise: a concise summary line, then structured details in paragraphs and an Args list. Every sentence adds value; no redundancy.

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?

Given no output schema or annotations, the description covers all essential aspects: purpose, risk, parameter meanings, behavioral nuances (skipped pods, partial undo), and usage pattern (dry-run). It is self-contained and sufficient for safe invocation.

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

Parameters5/5

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

The input schema has no descriptions (0% coverage), but the tool description includes an Args section explaining `name`, `dry_run`, and `target` with sufficient detail (e.g., 'Node name (see node_list)', 'preview without cordoning or evicting'). This fully compensates for the schema gap.

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?

The description clearly states the tool does both cordoning and eviction ('Cordon a node and evict its pods'). It distinguishes from siblings like `cordon_node` (cordon only) and `uncordon_node` (reversal). The high-risk warning adds specificity.

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

Usage Guidelines5/5

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

Explicit guidance: notes that DaemonSet and mirror pods are skipped (like `kubectl drain`), that cordon is reversible via `uncordon_node` while evictions are not, and recommends `dry_run=True` for preview. This helps an agent decide when to use and how to proceed safely.

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/AIops-tools/K8s-AIops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server