Skip to main content
Glama

secret_delete

Remove a Kubernetes Secret from a specified namespace to manage sensitive data securely. This tool helps delete secrets when they are no longer needed or to maintain cluster security.

Instructions

Delete a Secret from the specified namespace.

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

Returns: Status of the deletion operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • The handler function for the 'secret_delete' MCP tool. It uses the Kubernetes CoreV1Api to delete a secret in the given namespace. Decorated with @mcp.tool() for registration, @use_current_context for context management, and @check_readonly_permission for access control.
    @mcp.tool()
    @use_current_context
    @check_readonly_permission
    def secret_delete(context_name: str, namespace: str, name: str):
        """
        Delete a Secret from the specified namespace.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The Secret name
    
        Returns:
            Status of the deletion operation
        """
        core_v1: CoreV1Api = get_api_clients(context_name)["core"]
        core_v1.delete_namespaced_secret(name=name, namespace=namespace)
        return {"name": name, "status": "Deleted"}
  • The @mcp.tool() decorator registers the secret_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 action is a deletion but doesn't clarify if this is destructive, irreversible, requires specific permissions, or has side effects. The mention of 'Status of the deletion operation' hints at a response but lacks detail on format or error handling.

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 adds value without redundancy, making it appropriately sized and front-loaded for quick understanding.

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?

Given the tool's complexity (a destructive operation with 3 parameters), no annotations, and no output schema, the description is minimally adequate. It covers the basic action and parameters but lacks details on behavioral traits, error cases, or output specifics, leaving gaps for safe agent use.

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 adds meaning by explaining each parameter's purpose (e.g., 'The Kubernetes context name', 'The Kubernetes namespace', 'The Secret name'), which clarifies their roles beyond the schema's basic titles. However, it doesn't provide format examples or constraints.

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 target resource ('a Secret from the specified namespace'), distinguishing it from sibling tools like secret_get, secret_list, secret_create, and secret_update. It precisely identifies what the tool does without being vague or tautological.

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 like secret_get or secret_list, nor does it mention prerequisites or exclusions. While the context implies deletion of a specific secret, it lacks explicit usage context compared to siblings.

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