Skip to main content
Glama

exec_pod_command

Execute commands inside a Kubernetes pod by providing pod name and command, with optional namespace, container, and cluster settings for precise targeting.

Instructions

在Pod中执行命令

Args: pod_name: Pod名称 command: 要执行的命令列表,如 ["ls", "-la"] namespace: Kubernetes命名空间,默认为default container: 容器名称,如果Pod有多个容器则需要指定 kubeconfig_path: kubeconfig 文件路径,不指定则使用 cluster_name 或默认集群 cluster_name: 集群配置名称(clusters.json 中的 name),kubeconfig_path 未指定时使用

Returns: 命令执行结果

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
pod_nameYes
containerNo
namespaceNodefault
cluster_nameNo
kubeconfig_pathNo
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. It states that it executes a command and returns the result, but does not mention potential side effects (e.g., command may modify the pod or cluster), permission requirements, interactivity, or any safety caveats. This is a significant gap for an arbitrary command execution tool.

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 well-structured with labeled sections (Args, Returns) and each parameter is on its own line. It is appropriately sized for the tool's complexity, though a few elements (like repeating the parameter names in the schema) are redundant. No unnecessary fluff.

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?

The description covers all six parameters, including defaults and optionality, and states that the return value is the command execution result. It does not detail error handling, output format, or edge cases (e.g., what happens if the pod has multiple containers and none is specified), but the core information needed to invoke the tool is present.

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?

The description provides detailed semantics for every parameter, including an example for 'command' (e.g., ["ls", "-la"]), defaults for 'namespace' (default) and 'container' (must specify if multi-container), and the interaction between 'kubeconfig_path' and 'cluster_name'. This fully compensates for the 0% schema description coverage.

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 clearly states the tool's purpose: to execute a command inside a Kubernetes Pod ('在Pod中执行命令'). This uses a specific verb ('execute') and resource ('Pod'), distinguishing it from sibling tools like getting logs, copying files, or port-forwarding.

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

Usage Guidelines3/5

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

The usage context is implied by the purpose and the parameter list (e.g., namespace, container). However, there is no explicit statement about when to choose this tool over alternatives, nor any exclusions or preconditions. The tool's name and description make its primary use obvious, but no comparative guidance is given.

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