Skip to main content
Glama

configmap_delete

Delete a ConfigMap from a specified namespace in Kubernetes clusters managed by k8s-pilot. Removes configuration data to maintain cluster cleanliness and security.

Instructions

Delete a ConfigMap from the specified namespace.

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

Returns: Status of the deletion operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • The handler function for the 'configmap_delete' tool. It deletes the specified ConfigMap in the given namespace using the Kubernetes CoreV1Api. Includes registration via @mcp.tool() decorator and permission checks.
    @mcp.tool()
    @use_current_context
    @check_readonly_permission
    def configmap_delete(context_name: str, namespace: str, name: str):
        """
        Delete a ConfigMap from the specified namespace.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The ConfigMap name
    
        Returns:
            Status of the deletion operation
        """
        core_v1: CoreV1Api = get_api_clients(context_name)["core"]
        core_v1.delete_namespaced_config_map(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 this is a deletion operation, implying it's destructive, but doesn't disclose critical behavioral traits like whether deletion is permanent, if it requires specific RBAC permissions, what happens to dependent resources, or error conditions. The return statement is vague ('Status of the deletion operation') 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 parameter explanations and return information. Every sentence earns its place—no wasted words. It's appropriately sized for a straightforward 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?

Given this is a destructive operation with no annotations and no output schema, the description is incomplete. It doesn't address safety considerations, permissions, or what the return 'Status' entails. For a deletion tool in a complex system like Kubernetes, more context about behavior and consequences 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%, so the description must compensate. It provides clear semantic meaning for all three parameters (context_name, namespace, name) in the Args section, explaining what each represents in Kubernetes terms. This adds significant value beyond the bare schema, though it doesn't specify format constraints or examples.

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 a ConfigMap') and resource ('from the specified namespace'), distinguishing it from sibling tools like configmap_create, configmap_get, configmap_list, and configmap_update. It uses precise verbs and identifies the exact Kubernetes resource being manipulated.

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 (e.g., needing appropriate permissions), consequences (e.g., irreversible deletion), or when to choose deletion over other operations like update. The description assumes the user already knows when deletion is appropriate.

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