Skip to main content
Glama

ingress_create

Create Kubernetes Ingress resources to route external traffic to backend services in specified namespaces.

Instructions

Create an Ingress in the specified namespace.

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

Returns: Status of the creation operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes
hostYes
service_nameYes
service_portYes

Implementation Reference

  • The handler function for the 'ingress_create' MCP tool. It creates a Kubernetes Ingress resource in the specified namespace with the given host, service, and port using the Kubernetes NetworkingV1 API.
    def ingress_create(context_name: str, namespace: str, name: str, host: str, service_name: str, service_port: int):
        """
        Create an Ingress in the specified namespace.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The Ingress name
            host: The host for the Ingress
            service_name: The backend service name
            service_port: The backend service port
    
        Returns:
            Status of the creation operation
        """
        networking_v1: NetworkingV1Api = get_api_clients(context_name)["networking"]
        ingress = V1Ingress(
            metadata=V1ObjectMeta(name=name),
            spec=V1IngressSpec(
                rules=[
                    V1IngressRule(
                        host=host,
                        http=V1HTTPIngressRuleValue(
                            paths=[
                                V1HTTPIngressPath(
                                    path="/",
                                    path_type="Prefix",
                                    backend=V1IngressBackend(
                                        service={"name": service_name, "port": {"number": service_port}}
                                    )
                                )
                            ]
                        )
                    )
                ]
            )
        )
        created_ingress = networking_v1.create_namespaced_ingress(namespace=namespace, body=ingress)
        return {"name": created_ingress.metadata.name, "status": "Created"}
  • tools/ingress.py:28-28 (registration)
    The @mcp.tool() decorator registers the ingress_create 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 full burden for behavioral disclosure. It states 'Create an Ingress' which implies a write/mutation operation, but doesn't describe permissions required, whether it's idempotent, error conditions, or what 'Status of the creation operation' entails. The description lacks critical behavioral context for a creation tool in a Kubernetes environment.

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 clear sections (purpose, Args, Returns) and uses minimal sentences. The first sentence states the core purpose, followed by organized parameter documentation. No wasted words, though the Returns section could be more specific.

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?

For a 6-parameter creation tool with no annotations and no output schema, the description is moderately complete. It covers the basic purpose and parameters but lacks behavioral context (permissions, idempotency, error handling) and detailed return value explanation. Given the complexity of Kubernetes resource creation, more guidance would be helpful.

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. The Args section clearly documents all 6 parameters with brief explanations of what each represents (e.g., 'The Kubernetes context name', 'The backend service port'). This adds meaningful semantic context beyond the bare schema, though it doesn't provide format examples or validation rules.

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 ('Create an Ingress') and the resource ('in the specified namespace'), providing a specific verb+resource combination. It distinguishes from sibling tools like ingress_delete, ingress_get, ingress_list, and ingress_update by specifying creation. However, it doesn't explicitly differentiate from other creation tools like deployment_create or service_create beyond the resource type.

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 an existing service), when not to use it, or compare it to similar creation tools for other resources. The agent must infer usage from the tool name and parameter list 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