Skip to main content
Glama
Flux159
by Flux159

exec_in_pod

Destructive

Execute a command in a Kubernetes pod or container and receive the output. Uses an array format for secure, shell-free execution.

Instructions

Execute a command in a Kubernetes pod or container and return the output. Command must be an array of strings where the first element is the executable and remaining elements are arguments. This executes directly without shell interpretation for security.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the pod to execute the command in
namespaceNoKubernetes namespacedefault
commandYesCommand to execute as an array of strings (e.g. ["ls", "-la", "/app"]). First element is the executable, remaining are arguments. Shell operators like pipes, redirects, or command chaining are not supported - use explicit array format for security.
containerNoContainer name (required when pod has multiple containers)
timeoutNoTimeout for command - 60000 milliseconds if not specified
contextNoKubeconfig Context to use for the command (optional - defaults to null)
Behavior4/5

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

The description adds value beyond the destructiveHint annotation by explaining the tool executes directly without shell interpretation, enhancing security understanding. It also mentions returning output, but does not detail error handling or whether it waits for completion.

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 concise (3-4 sentences), front-loaded with the purpose, and every sentence adds value—purpose, format requirement, security context, and array explanation. No redundant or missing information.

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?

Despite the lack of output schema, the description covers the tool's primary behavior and all parameters. It lacks details on return value structure (e.g., whether it includes stderr or exit code) and error scenarios, but is otherwise comprehensive for the complexity level.

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 coverage is 100%, and the description adds substantial meaning: it explains the array format for 'command', clarifies when 'container' is required, and specifies the default timeout (60000 ms). This goes beyond the schema's brief descriptions.

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 'Execute a command in a Kubernetes pod or container and return the output,' specifying the verb (execute), resource (pod/container), and outcome (return output). This distinguishes it from sibling tools like kubectl_logs or kubectl_get, which have different purposes.

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 description provides clear context on command format and security (no shell interpretation), implying safe usage. However, it does not explicitly state when to use this tool vs alternatives like port_forward or kubectl_apply, nor list exclusion criteria.

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/Flux159/mcp-server-kubernetes'

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