Skip to main content
Glama

Attach pod

k8s_attach_pod

Attach to a running container inside a Kubernetes pod to inspect its state, run commands, or troubleshoot issues interactively.

Instructions

Attach to a running container in a pod.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pod_name": "<pod_name>"
    },
    "name": "k8s_attach_pod"
  }
}

Input Schema

NameRequiredDescriptionDefault
contextNoNamed context of the multi-context pool to run against (see cm_multi_context list_contexts); the default context if omitted.
pod_nameYes
containerNo
namespaceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.4.2

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, openWorldHint=true, and destructiveHint=false, so the safety profile is partly covered. The description adds little beyond that: it does not mention that attach opens an interactive session/stream, whether a TTY or terminal is needed, what happens on disconnect, or what permissions are required. No annotation contradiction is present.

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 a single front-loaded sentence with no filler or repetition. Its brevity is efficient structurally, though the missing details are a completeness problem rather than a conciseness virtue.

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?

This is an interactive attach tool with four parameters, no output schema, and weak schema coverage. The description omits session behavior, parameter semantics, and alternatives, relying almost entirely on annotations that only cover safety flags.

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

Parameters2/5

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

Schema description coverage is only 25%, with context documented in the schema but pod_name, container, and namespace largely undocumented. The description vaguely implies pod and container selection, but it does not explain the required pod_name, container default/null behavior, namespace default/null behavior, or context handling.

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?

States a specific verb ("Attach") and target ("running container in a pod"), so the purpose is clear and not a tautology. It does not distinguish the tool from close siblings such as k8s_exec_pod or k8s_debug_pod, leaving ambiguity about when attach is the right choice.

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 phrase "running container" implies a prerequisite, but the description gives no explicit when-to-use, when-not-to-use, or alternatives like exec, debug, or logs. An agent gets no guidance on selecting this tool over nearby interactive or inspection tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools