Skip to main content
Glama

Copy to pod

k8s_copy_to_pod

Copy a local file or directory into a specified Kubernetes pod and namespace via kubectl cp to move files into running containers.

Instructions

Copy a local file/dir into a pod 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_to_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

B3.1/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 safety framing is partly covered. However, the description omits critical behavior for a file-writing tool: whether an existing file at the destination is overwritten, where relative destination paths resolve, and which container is targeted in a multi-container pod.

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, and the subject and mechanism appear immediately. The brevity borders on under-specification, but nothing is redundant or buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple file-transfer tool with no output schema, the definition covers the action and the mechanism; the missing pieces (overwrite behavior, container targeting, prerequisites) are notable but not fatal for a copy tool. There is no output schema, so return values need not be explained.

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?

Schema description coverage is only 20%, so the burden is on the description, and it only clarifies that 'source' is a local file or directory and the target is the pod. It adds no semantics for pod_name, namespace, or destination path format, leaving three of five parameters to naming conventions alone.

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 concrete verb and resource ('Copy a local file/dir into a pod') plus the underlying mechanism ('kubectl cp'), which makes the direction of transfer explicit and distinguishes it from a from-pod copy. It does not differentiate itself from the other copy siblings (k8s_cp_pod), leaving ambiguity about which one to pick.

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?

No guidance on when to use this versus k8s_cp_pod, k8s_exec_pod, or k8s_attach_pod, and no prerequisites such as the target container needing tar or the file being readable locally. The agent must infer all usage conditions.

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