Skip to main content
Glama

service_delete

Remove a Kubernetes Service from a specified namespace to manage cluster resources and maintain clean infrastructure.

Instructions

Delete a Service from the specified namespace.

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

Returns: Status of the deletion operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • The core handler function for the 'service_delete' MCP tool. It deletes a Kubernetes Service in the specified namespace using the Kubernetes CoreV1Api client. Registered via the @mcp.tool() decorator.
    @mcp.tool()
    @use_current_context
    @check_readonly_permission
    def service_delete(context_name: str, namespace: str, name: str):
        """
        Delete a Service from the specified namespace.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The Service name
    
        Returns:
            Status of the deletion operation
        """
        core_v1: CoreV1Api = get_api_clients(context_name)["core"]
        core_v1.delete_namespaced_service(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. While 'Delete' implies a destructive mutation, the description doesn't specify whether this is irreversible, what permissions are required, or how errors are handled (e.g., if the service is in use). The return statement is vague ('Status of the deletion operation'), offering minimal insight into outcomes. For a destructive tool with zero annotation coverage, this leaves critical behavioral aspects unclear.

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 well-structured and front-loaded with the core purpose in the first sentence. The Args and Returns sections are clearly separated, making it easy to parse. However, the return statement is overly vague ('Status of the deletion operation'), which slightly reduces efficiency by not conveying useful information.

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?

For a destructive mutation tool with no annotations and no output schema, the description is incomplete. It lacks critical context such as error conditions, side effects (e.g., impact on dependent resources), and what the return status entails. Given the complexity of Kubernetes service deletion and the absence of structured safety hints, more detailed behavioral guidance is needed for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description lists the three parameters with brief explanations (e.g., 'The Kubernetes context name'), which adds basic semantics beyond the schema's titles. However, it doesn't clarify format expectations (e.g., valid namespace patterns) or dependencies between parameters, leaving some ambiguity. Given the coverage gap, this provides partial but insufficient compensation.

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 Service from the specified namespace'), making the purpose unambiguous. It distinguishes itself from sibling tools like service_get, service_list, service_create, and service_update by specifying deletion. However, it doesn't explicitly contrast with other deletion tools like configmap_delete or deployment_delete, which would require more specific differentiation.

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. It doesn't mention prerequisites (e.g., needing proper permissions), when deletion is appropriate, or what happens if the service doesn't exist. With many sibling tools available (e.g., service_get to check existence first), the lack of usage context is a significant gap.

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