Skip to main content
Glama

copy_pod_files

Copy files between Kubernetes Pods and the local machine. Read from a Pod or write to it, supporting directories and both text and binary files.

Instructions

Pod 与 MCP 客户端之间拷贝文件

Args: pod_name: Pod 名称 direction: 拷贝方向,"from_pod" 读取 Pod 文件内容,"to_pod" 将内容写入 Pod pod_paths: from_pod 时为 Pod 内文件路径(JSON 数组或单个路径,支持目录);to_pod 时为 Pod 内目标文件路径 content: to_pod 时必填(local_path 未指定时),要写入 Pod 的文件内容 encoding: to_pod 时 content 的编码方式,"text"(默认)或 "base64"(二进制文件) local_path: 本地文件路径。from_pod 时指定则直接将解码后的文件保存到此目录(二进制文件不再需要中间 base64 文件);to_pod 时指定则从此本地文件读取内容写入 Pod namespace: 命名空间,默认为 default container: 容器名称,多容器 Pod 需指定 kubeconfig_path: kubeconfig 文件路径,不指定则使用 cluster_name 或默认集群 cluster_name: 集群配置名称(clusters.json 中的 name),kubeconfig_path 未指定时使用

Returns: from_pod: 文件内容或本地保存路径; to_pod: 写入确认

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNo
encodingNotext
pod_nameYes
containerNo
directionYes
namespaceNodefault
pod_pathsYes
local_pathNo
cluster_nameNo
kubeconfig_pathNo
Behavior5/5

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

With no annotations provided, the description carries the full burden and covers it well: it explains direction-specific behavior, encoding for binary files, how local_path changes the flow, and return values. It also notes that to_pod file writes are confirmed and from_pod returns content or a saved path.

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 front-loaded with a one-line purpose, then uses a structured Args list and a Returns note. Every sentence adds value, and the information density is high without being verbose.

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

Completeness5/5

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

For a 10-parameter, two-direction file-copy tool with no output schema, the description covers all essential behavior: parameter meanings, direction logic, encoding, defaults, container selection, and return values. It is self-sufficient for an agent to invoke it correctly.

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

Parameters5/5

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

Schema description coverage is 0%, but the description compensates by explaining every parameter, including conditional requirements (content is required when local_path is not specified), defaults (namespace=default, encoding=text), and formats (pod_paths as JSON array or single path). This goes far beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action: copy files between a Pod and the MCP client, and the Args section defines both directions (from_pod/to_pod). This clearly distinguishes it from siblings that inspect logs, execute commands, or manage clusters.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The Args give explicit usage conditions: direction values, when content is required, local_path alternatives, namespace default, multi-container requirement, and kubeconfig fallback logic. It does not explicitly mention when to avoid this tool in favor of a sibling, but the context is otherwise clear.

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

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