configmap_delete
Remove a ConfigMap from a specified Kubernetes namespace using this tool. Input the context name, namespace, and ConfigMap name to manage resource cleanup efficiently.
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
| Name | Required | Description | Default |
|---|---|---|---|
| context_name | Yes | ||
| name | Yes | ||
| namespace | Yes |
Implementation Reference
- tools/configmap.py:99-113 (handler)The handler function that executes the logic to delete a specific ConfigMap in the given namespace using the Kubernetes CoreV1Api client.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"}
- tools/configmap.py:96-98 (registration)Registers the configmap_delete tool with the MCP framework using the @mcp.tool() decorator, along with context and permission decorators.@mcp.tool() @use_current_context @check_readonly_permission