Skip to main content
Glama

pvc_delete

Delete PersistentVolumeClaims from Kubernetes clusters to manage storage resources and clean up unused volumes.

Instructions

Delete a PersistentVolumeClaim from the specified namespace.

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

Returns: Status of the deletion operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • The pvc_delete tool handler decorated with @mcp.tool() for registration. It deletes the specified PVC using Kubernetes CoreV1Api.delete_namespaced_persistent_volume_claim.
    @mcp.tool()
    @use_current_context
    @check_readonly_permission
    def pvc_delete(context_name: str, namespace: str, name: str):
        """
        Delete a PersistentVolumeClaim from the specified namespace.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The PersistentVolumeClaim name
    
        Returns:
            Status of the deletion operation
        """
        core_v1: CoreV1Api = get_api_clients(context_name)["core"]
        core_v1.delete_namespaced_persistent_volume_claim(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. While 'Delete' implies a destructive mutation, it doesn't disclose critical behavioral traits: whether deletion is permanent/reversible, what happens to associated resources (e.g., storage), permission requirements, or error conditions. The return statement ('Status of the deletion operation') is vague without specifying format or possible outcomes.

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 efficiently structured with a clear purpose statement followed by organized Args and Returns sections. Every sentence earns its place: the first states the action, the second lists parameters, the third describes output. No redundant information or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive operation with 3 parameters and no annotations/output schema, the description is minimally adequate but incomplete. It covers the basic what and parameters but lacks behavioral context (safety, side effects) and detailed output information. Given the complexity of Kubernetes resource deletion, more guidance on consequences and error handling would be beneficial.

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 clearly documenting all three parameters in the Args section with meaningful names and context. Each parameter ('context_name', 'namespace', 'name') is explained in relation to Kubernetes concepts, adding semantic value beyond the bare schema. However, it doesn't provide format examples or validation rules.

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 action ('Delete') and resource ('PersistentVolumeClaim') with scope ('from the specified namespace'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'pvc_delete' vs 'pv_delete' or other deletion tools, which would require mentioning it's specifically for PersistentVolumeClaims rather than PersistentVolumes or other resources.

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. With many sibling deletion tools (e.g., 'pod_delete', 'configmap_delete', 'pv_delete'), there's no indication that this is specifically for PersistentVolumeClaims or when to choose it over other deletion operations. No prerequisites, warnings, or alternative tools are mentioned.

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