Skip to main content
Glama

ingress_update

Update Kubernetes Ingress configurations to modify host routing and backend service connections for managing external access to applications.

Instructions

Update an existing Ingress in the specified namespace.

Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The Ingress name host: The new host for the Ingress service_name: The new backend service name service_port: The new backend service port

Returns: Status of the update operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes
hostYes
service_nameYes
service_portYes

Implementation Reference

  • The main handler function for the 'ingress_update' tool, which updates an existing Kubernetes Ingress resource by modifying its host, backend service name, and service port.
    def ingress_update(context_name: str, namespace: str, name: str, host: str, service_name: str, service_port: int):
        """
        Update an existing Ingress in the specified namespace.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The Ingress name
            host: The new host for the Ingress
            service_name: The new backend service name
            service_port: The new backend service port
    
        Returns:
            Status of the update operation
        """
        networking_v1: NetworkingV1Api = get_api_clients(context_name)["networking"]
        ingress = networking_v1.read_namespaced_ingress(name=name, namespace=namespace)
        ingress.spec.rules[0].host = host
        ingress.spec.rules[0].http.paths[0].backend.service.name = service_name
        ingress.spec.rules[0].http.paths[0].backend.service.port.number = service_port
        updated_ingress = networking_v1.replace_namespaced_ingress(name=name, namespace=namespace, body=ingress)
        return {"name": updated_ingress.metadata.name, "status": "Updated"}
  • The @mcp.tool() decorator registers the ingress_update 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 this is an update operation, implying mutation, but lacks details on permissions required, whether changes are idempotent or reversible, error handling, or rate limits. The return statement is vague ('Status of the update operation'), offering minimal insight into outcomes.

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 with a clear opening sentence followed by an 'Args' and 'Returns' section. It's appropriately sized for a 6-parameter tool, though the return statement could be more informative. There's no wasted text, and information is front-loaded effectively.

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 mutation tool with 6 parameters, 0% schema coverage, no annotations, and no output schema, the description is insufficient. It covers basic parameter semantics but lacks critical behavioral details (e.g., side effects, error cases) and output specifics, leaving the agent under-informed for safe and effective 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 lists all six parameters with brief explanations (e.g., 'The new host for the Ingress'), adding meaningful context beyond the schema's titles. However, it doesn't specify formats (e.g., for 'host') or constraints (e.g., valid port ranges), leaving some gaps.

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 verb ('Update') and resource ('an existing Ingress'), and specifies the scope ('in the specified namespace'). It distinguishes from sibling tools like 'ingress_create' and 'ingress_delete' by focusing on updates, though it doesn't explicitly contrast with them. The purpose is specific and actionable.

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 'ingress_create' for new resources or 'ingress_get' for inspection. It mentions no prerequisites, constraints, or typical scenarios for updates, leaving the agent to infer usage from the tool name alone.

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