Skip to main content
Glama
Flux159
by Flux159

exec_in_pod

Destructive

Execute a command in a Kubernetes pod and return its output. Uses an array format for secure, direct execution without shell interpretation.

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)

Implementation Reference

  • The Zod response schema 'ExecInPodResponseSchema' validating the return type (array of content with type and text).
    export const ExecInPodResponseSchema = z.object({
      content: z.array(ToolResponseContent),
    });
Behavior3/5

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

Annotations already set destructiveHint=true. The description adds that execution is direct without shell interpretation for security, which is useful but does not elaborate on potential destructive outcomes (e.g., modifying files or state).

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 three sentences, front-loaded with the primary purpose, followed by detailed constraints on command format and security. Every sentence adds value without redundancy.

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?

Given 6 parameters, 2 required, and no output schema, the description covers the key aspects: purpose, command format, and security. It does not explain the output structure or error behavior, but this is typical for execution tools.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds extra context beyond the schema: clarifying the command array format, disallowing shell operators, and stating the timeout default (60000 ms). This provides practical guidance for correct use.

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 action: executing a command in a Kubernetes pod/container and returning output. It specifies the command format (array of strings, no shell), distinguishing it from sibling tools like kubectl_logs (for logs) and kubectl_get (for resources).

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 description implies the tool is for command execution but does not explicitly state when to use it versus alternatives like kubectl_exec or when not to use it. It provides no exclusions or context-specific guidance.

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