Skip to main content
Glama

uncordon_node

Mark a Kubernetes node as schedulable to allow pod deployment after maintenance or issues, using the k8s-pilot server for cluster management.

Instructions

Uncordon a node (mark as schedulable).

Args: context_name: The Kubernetes context name node_name: The name of the node to uncordon

Returns: JSON string containing the result of the operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
node_nameYes

Implementation Reference

  • The handler function for the 'uncordon_node' MCP tool. It uses the Kubernetes CoreV1Api to read the node status, checks if it's already schedulable, and if not, patches the node's spec.unschedulable to False. The @mcp.tool() decorator registers it as an MCP tool.
    @mcp.tool()
    @use_current_context
    def uncordon_node(context_name: str, node_name: str):
        """
        Uncordon a node (mark as schedulable).
    
        Args:
            context_name: The Kubernetes context name
            node_name: The name of the node to uncordon
    
        Returns:
            JSON string containing the result of the operation
        """
        core_v1: CoreV1Api = get_api_clients(context_name)["core"]
    
        # Get the current node
        node = core_v1.read_node(node_name)
    
        # Check if already uncordoned
        if not node.spec.unschedulable:
            result = {
                "name": node_name,
                "status": "already schedulable",
                "unschedulable": False
            }
            return json.dumps(result)
    
        # Apply the patch
        body = {
            "spec": {
                "unschedulable": False
            }
        }
    
        patched_node = core_v1.patch_node(node_name, body)
    
        result = {
            "name": patched_node.metadata.name,
            "status": "uncordoned",
            "unschedulable": patched_node.spec.unschedulable
        }
    
        return json.dumps(result)
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral context. It states the operation but doesn't disclose required permissions, whether it's idempotent, typical error conditions, or what 'schedulable' entails. The return format mention is vague ('JSON string containing the result').

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?

The description is appropriately sized and front-loaded: the core purpose is stated first, followed by parameter and return details. The structure is clear with labeled sections. No wasted sentences, though the return statement could be more informative.

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?

Given no annotations and no output schema, the description is incomplete for a mutation tool. It lacks details on permissions, side effects, error handling, and the structure of the return JSON. For a Kubernetes node operation, more context is needed for safe and effective use.

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

Parameters3/5

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

Schema description coverage is 0%, but the description includes an 'Args' section that documents both parameters with brief explanations. This adds meaningful semantics beyond the bare schema, though it doesn't elaborate on format constraints or provide examples. For 2 parameters, this is adequate but basic.

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 clearly states the verb ('uncordon') and resource ('a node'), with the parenthetical 'mark as schedulable' providing helpful clarification. It distinguishes from sibling 'cordon_node' by being the opposite operation, though not explicitly mentioned. The purpose is specific and unambiguous.

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?

No explicit guidance on when to use this tool versus alternatives is provided. The description doesn't mention prerequisites (e.g., the node must be cordoned first), nor does it reference the sibling 'cordon_node' tool for context. Usage is implied but not articulated.

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/bourbonkk/k8s-pilot'

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