Skip to main content
Glama

create-ephemeral-container

Debug Kubernetes pods by creating temporary containers to run diagnostic commands and troubleshoot issues without restarting the pod.

Instructions

Create an ephemeral debug container in a pod

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
podYesThe name of the pod
imageYesThe container image to use for debugging
nameYesThe name of the ephemeral container
namespaceNoThe namespace of the pod (optional, defaults to current context namespace)
commandNoThe command to run in the container

Implementation Reference

  • The handler function for the 'create-ephemeral-container' tool. It destructures the arguments, constructs a kubectl debug command with ephemeral container options, executes it via execAsync, and returns the stdout or a success message.
    case "create-ephemeral-container": {
      const { pod, image, name, namespace, command } = args;
      const nsArg = namespace ? `-n ${namespace}` : "";
      const commandArg = command ? `-- ${command}` : "";
      const cmd = `kubectl debug ${pod} ${nsArg} --image=${image} --container=${name} --ephemeral-containers ${commandArg}`;
      const { stdout } = await execAsync(cmd);
      return {
        content: [{ type: "text", text: stdout || `Ephemeral container ${name} created in pod ${pod}` }]
      };
    }
  • server.js:1326-1354 (registration)
    The tool registration entry in the tools array, which includes the name, description, and inputSchema. This is returned by the ListToolsRequestHandler.
      name: "create-ephemeral-container",
      description: "Create an ephemeral debug container in a pod",
      inputSchema: {
        type: "object",
        properties: {
          pod: { 
            type: "string",
            description: "The name of the pod"
          },
          image: { 
            type: "string",
            description: "The container image to use for debugging"
          },
          name: { 
            type: "string",
            description: "The name of the ephemeral container"
          },
          namespace: { 
            type: "string",
            description: "The namespace of the pod (optional, defaults to current context namespace)"
          },
          command: { 
            type: "string",
            description: "The command to run in the container"
          }
        },
        required: ["pod", "image", "name"]
      }
    },
  • The inputSchema defining the parameters for the create-ephemeral-container tool, including required fields pod, image, name.
    inputSchema: {
      type: "object",
      properties: {
        pod: { 
          type: "string",
          description: "The name of the pod"
        },
        image: { 
          type: "string",
          description: "The container image to use for debugging"
        },
        name: { 
          type: "string",
          description: "The name of the ephemeral container"
        },
        namespace: { 
          type: "string",
          description: "The namespace of the pod (optional, defaults to current context namespace)"
        },
        command: { 
          type: "string",
          description: "The command to run in the container"
        }
      },
      required: ["pod", "image", "name"]
    }
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 'create' implies a mutation and 'ephemeral' hints at temporary nature, it lacks details on permissions required, side effects (e.g., impact on pod operations), or response format. This is inadequate for a mutation tool with zero annotation coverage.

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 directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, making it easy to parse quickly.

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?

Given the complexity of creating a container in a Kubernetes pod (a mutation operation) and the absence of both annotations and an output schema, the description is insufficient. It doesn't cover behavioral aspects like safety, permissions, or what to expect upon success/failure, leaving significant gaps for an AI agent.

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?

The input schema has 100% description coverage, so the schema already documents all parameters thoroughly. The description doesn't add any additional meaning or context beyond what's in the schema, such as explaining interactions between parameters or usage examples, resulting in a baseline score.

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') and resource ('ephemeral debug container in a pod'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'debug-pod' or 'exec', which might have overlapping debugging functionality, preventing a perfect score.

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. With sibling tools like 'debug-pod' and 'exec' that could serve similar debugging purposes, there's no indication of specific scenarios, prerequisites, or exclusions for this tool's use.

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/thekaranpargaie/kube-mcp'

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