Skip to main content
Glama

role_delete

Delete a Role from a specified namespace in Kubernetes to manage access control and permissions.

Instructions

Delete a Role from the specified namespace.

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

Returns: Status of the deletion operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • Handler function for the 'role_delete' tool. Deletes a Kubernetes Role in the specified namespace using the RBAC API. Registered via @mcp.tool() decorator.
    @mcp.tool()
    @use_current_context
    @check_readonly_permission
    def role_delete(context_name: str, namespace: str, name: str):
        """
        Delete a Role from the specified namespace.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The Role name
    
        Returns:
            Status of the deletion operation
        """
        rbac_v1: RbacAuthorizationV1Api = get_api_clients(context_name)["rbac"]
        rbac_v1.delete_namespaced_role(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 the full burden of behavioral disclosure. It states this is a deletion operation, implying it's destructive, but doesn't specify critical details like whether deletion is irreversible, what permissions are required, potential side effects (e.g., impact on bound subjects), or error handling. For a destructive tool with zero annotation coverage, this 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 appropriately sized and front-loaded, with the core purpose stated first, followed by parameter details and return information. Every sentence adds value, though the structure could be slightly more polished (e.g., integrating the 'Args' section more seamlessly).

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 complexity (a destructive Kubernetes operation with 3 parameters), no annotations, and no output schema, the description is moderately complete. It covers the basic purpose and parameters but lacks behavioral details (e.g., safety, permissions) and output specifics beyond a vague 'Status of the deletion operation'. For a tool of this nature, more comprehensive guidance is warranted.

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?

The description includes an 'Args' section that lists and briefly explains all three parameters (context_name, namespace, name), adding meaningful context beyond the schema. With 0% schema description coverage, this compensates well by clarifying what each parameter represents, though 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.

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 ('a Role from the specified namespace'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'clusterrole_delete' or 'role_get', which would require mentioning it's specifically for Role resources (not ClusterRole) and that it performs deletion (not retrieval).

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. The description doesn't mention prerequisites (e.g., needing appropriate permissions), when not to use it (e.g., if the Role is in use), or direct alternatives like 'role_get' for checking before deletion. The context is implied (Kubernetes Role management) but not explicitly stated.

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