Skip to main content
Glama

replicaset_delete

Delete a ReplicaSet from a specified namespace in Kubernetes clusters managed by k8s-pilot. This tool removes ReplicaSet resources to manage application scaling and deployments.

Instructions

Delete a ReplicaSet from the specified namespace.

Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The ReplicaSet name

Returns: Status of the deletion operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • The handler function for the 'replicaset_delete' MCP tool. It is registered via the @mcp.tool() decorator and uses the Kubernetes API to delete the specified ReplicaSet. Includes decorators for context and permissions.
    @mcp.tool()
    @use_current_context
    @check_readonly_permission
    def replicaset_delete(context_name: str, namespace: str, name: str):
        """
        Delete a ReplicaSet from the specified namespace.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The ReplicaSet name
    
        Returns:
            Status of the deletion operation
        """
        apps_v1: AppsV1Api = get_api_clients(context_name)["apps"]
        apps_v1.delete_namespaced_replica_set(name=name, namespace=namespace)
        return {"name": name, "status": "Deleted"}
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool deletes a ReplicaSet but doesn't disclose critical behavioral traits: whether deletion is permanent/reversible, if it requires specific permissions, what happens to associated pods, or error conditions. For a destructive operation with zero annotation coverage, this is inadequate.

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 with the core purpose. The Args/Returns sections are structured but could be more integrated. Every sentence earns its place, though minor improvements in flow are possible.

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 the complexity of a destructive Kubernetes operation with no annotations and no output schema, the description is incomplete. It doesn't explain the return value format, error handling, or safety considerations. For a delete tool in this context, more detail is needed.

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%, but the description compensates by listing all three parameters (context_name, namespace, name) with brief explanations. It adds meaning beyond the bare schema, though it doesn't specify format constraints or examples. With 0% coverage, this is good but not exhaustive.

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 specific action ('Delete') and resource ('a ReplicaSet from the specified namespace'), distinguishing it from sibling tools like replicaset_create, replicaset_get, replicaset_list, and replicaset_update. It provides a complete verb+resource+scope statement.

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 guidance is provided on when to use this tool versus alternatives. While the purpose is clear, there's no mention of prerequisites, consequences, or comparison with similar deletion tools (e.g., pod_delete, deployment_delete). The description lacks context for decision-making.

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