Skip to main content
Glama

Copy from pod

k8s_copy_from_pod

Copy files or directories from a Kubernetes pod to the local host with kubectl cp, enabling retrieval of pod artifacts without direct container access.

Instructions

Copy a file/dir out of a pod to the local host via kubectl cp.

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>",
      "namespace": "<namespace>",
      "source": "<source>",
      "destination": "<destination>"
    },
    "name": "k8s_copy_from_pod"
  }
}

Input Schema

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

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, destructiveHint=false, and openWorldHint=true, so the safety profile is partially covered. The description adds only the underlying mechanism (kubectl cp) and says nothing about whether an existing local destination file is overwritten, permission requirements, or failure modes on minimal container images — the details that matter most for a copy-out operation.

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?

A single front-loaded sentence with no filler or redundancy. It is tight, though the brevity comes partly at the cost of the missing semantics noted above.

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?

With 5 parameters, 20% schema coverage, no output schema, and a copy operation that touches the local filesystem, the definition is too thin. An agent cannot determine path conventions or overwrite behavior from this description alone.

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 20% (only `context` is documented), so the description must compensate and does not. Critically, it never explains that `source` is a pod-side path and `destination` is a local path, or whether the pod name is embedded in the path as with raw kubectl cp syntax.

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?

"Copy a file/dir out of a pod to the local host via kubectl cp" gives a specific verb (copy), resource (pod), and direction (pod -> local host), which implicitly separates it from the sibling k8s_copy_to_pod. It never names the sibling explicitly, so an agent must infer the pairing from direction wording alone.

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?

There is no when-to-use guidance, no mention of when the opposite-direction tool applies, and no prerequisites (e.g. that the pod must have tar available for kubectl cp). The agent is left to infer all selection criteria.

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