Skip to main content
Glama
abhijeetka
by abhijeetka

create_deployment

Deploy containerized applications to Kubernetes by specifying name, image, namespace, and replica count for scalable cluster management.

Instructions

Create a Kubernetes deployment with specified name, image, namespace and replicas

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
imageYes
namespaceNodefault
replicasNo

Implementation Reference

  • This is the handler function for the 'create_deployment' tool, decorated with @mcp.tool() which registers it in the FastMCP server. It uses kubectl to create a deployment with the given name, image, namespace, and replicas.
    @mcp.tool()
    async def create_deployment(name: str, image: str, namespace: str = "default", replicas: int = 1) -> dict:
        """Create a Kubernetes deployment with specified name, image, namespace and replicas"""
        try:
            # Apply the deployment
            cmd = ["kubectl", "create", "deploy", name, 
                   "--replicas", str(replicas), 
                   "--image", image,
                   "-n", namespace]
            result = subprocess.run(cmd, capture_output=True, text=True, check=True)
            
            return {"message": f"Deployment {name} created successfully in namespace {namespace}", 
                    "details": result.stdout}
        except subprocess.CalledProcessError as e:
            return {"error": f"Failed to create deployment: {str(e)}"}
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 this is a creation operation but doesn't mention permissions required, whether it's idempotent, what happens on conflicts, or what the typical response looks like. For a Kubernetes deployment creation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 a single, efficient sentence that states the core purpose and key parameters without any wasted words. It's appropriately sized and front-loaded with the essential 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 Kubernetes deployment creation tool with no annotations, no output schema, and 4 parameters, the description is insufficient. It doesn't cover error conditions, response format, side effects, or integration with other tools. Given the complexity of Kubernetes operations, more context 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.

Parameters4/5

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

With 0% schema description coverage, the description adds substantial value by listing the four key parameters (name, image, namespace, replicas) and their purpose. It doesn't provide format details or constraints, but gives meaningful context beyond the bare schema. The baseline would be lower without this parameter information.

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 'create' and resource 'Kubernetes deployment', and specifies the key parameters (name, image, namespace, replicas). It distinguishes from siblings like 'update_deployment' by focusing on creation, but doesn't explicitly differentiate from other creation tools that might exist in the broader Kubernetes ecosystem.

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 'update_deployment' or other Kubernetes resource creation tools. It doesn't mention prerequisites, dependencies, or typical scenarios for deployment creation versus other operations.

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/abhijeetka/mcp-k8s-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server