Skip to main content
Glama

statefulset_delete

Delete a StatefulSet from a specified Kubernetes namespace to remove stateful applications and manage cluster resources.

Instructions

Delete a StatefulSet from the specified namespace.

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

Returns: Status of the deletion operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • The handler function for the 'statefulset_delete' MCP tool. It deletes a StatefulSet using the Kubernetes API. Registered via the @mcp.tool() decorator.
    @mcp.tool()
    @use_current_context
    @check_readonly_permission
    def statefulset_delete(context_name: str, namespace: str, name: str):
        """
        Delete a StatefulSet from the specified namespace.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The StatefulSet name
    
        Returns:
            Status of the deletion operation
        """
        apps_v1: AppsV1Api = get_api_clients(context_name)["apps"]
        apps_v1.delete_namespaced_stateful_set(name=name, namespace=namespace)
        return {"name": name, "status": "Deleted"}
  • The @mcp.tool() decorator registers the statefulset_delete function as an MCP tool.
    @mcp.tool()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool deletes a StatefulSet but doesn't describe critical behaviors: whether deletion is immediate or cascading, if it requires confirmation, what happens to pods and persistent volume claims, or potential side effects. For a destructive operation, this lack of transparency is a significant gap.

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 well-structured with clear sections (purpose, args, returns) and uses minimal words. Every sentence serves a purpose, though the parameter explanations could be more informative. It's appropriately sized for a deletion tool with three parameters.

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?

For a destructive tool with no annotations and no output schema, the description is incomplete. It doesn't explain the deletion behavior (cascading effects, confirmation), return value details beyond 'Status of the deletion operation', error conditions, or permissions required. Given the complexity of Kubernetes StatefulSet deletion, this leaves critical gaps for an agent to understand the tool fully.

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?

The description lists all three parameters with brief explanations, but schema description coverage is 0%, so the schema provides no additional documentation. The parameter explanations are minimal ('The Kubernetes context name', 'The Kubernetes namespace', 'The StatefulSet name') and don't add meaningful context beyond what the parameter names imply. This meets the baseline for when schema coverage is low but doesn't fully compensate.

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 StatefulSet from the specified namespace'), distinguishing it from sibling tools like statefulset_create, statefulset_get, and statefulset_list. It precisely communicates the tool's function without ambiguity.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing appropriate permissions), when deletion is appropriate, or what happens to associated resources (e.g., persistent volumes). There's no comparison to sibling tools like statefulset_update or general deletion considerations.

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