Skip to main content
Glama
ay-garg

OpenShift 4 MCP Server

drain_node

Evicts all evictable pods from a node to prepare it for maintenance. Cordons the node first and optionally handles daemonsets, emptyDir volumes, and forced eviction.

Instructions

Drain a node by evicting all evictable pods (cordons the node first).

Args: name: Name of the node to drain. ignore_daemonsets: Ignore DaemonSet-managed pods (default True). delete_emptydir_data: Allow deletion of pods with emptyDir volumes (default False). force: Force eviction of pods not managed by a controller (default False). grace_period: Seconds for graceful termination; -1 uses pod default. cluster: Named cluster to target (empty = default).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
forceNo
clusterNo
grace_periodNo
ignore_daemonsetsNo
delete_emptydir_dataNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

TDQS

A3.9/5.0
Behavior3/5

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

There are no annotations, so the description carries the full burden, and it does reveal the main side effects: evicting pods and cordoning first. However, it does not disclose operational caveats such as potential workload disruption, PodDisruptionBudget restrictions, or when force is needed beyond the dry parameter list.

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?

The description is appropriately compact and well structured: a one-sentence purpose statement followed by a compact argument glossary. No filler or repeated schema information; each line carries useful parameter semantics.

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?

For a six-parameter mutation tool with no annotations, the description covers the action, parameter semantics, and the cordon-first ordering, and the presence of an output schema reduces the need to describe return values. It still leaves an agent to infer operational context like whether drain is disruptive or what can cause evictions to fail, so it does not reach a perfect score.

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?

Schema description coverage is 0%, and the Args block provides meaningful explanations for all six parameters. Examples like 'grace_period: Seconds for graceful termination; -1 uses pod default' and 'cluster: Named cluster to target (empty = default)' add real guidance the schema does not offer.

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 states a specific verb and resource: 'Drain a node by evicting all evictable pods (cordons the node first).' This clearly distinguishes it from read-only or non-disruptive node tools and explains the operation in two clear clauses.

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?

The description does not explicitly say when to choose drain_node versus equivalent alternatives like cordon_node or uncordon_node. The core action is clear, but there is no guidance on when not to use it or when a simpler/targeted sibling would be preferable.

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