Skip to main content
Glama
Flux159
by Flux159

exec_in_pod

Destructive

Execute commands inside a Kubernetes pod or container by specifying the executable and arguments as an array, with support for namespace, container selection, and timeout.

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)
Behavior3/5

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

Annotations already include destructiveHint=true, so description adds moderate context by noting direct execution without shell. Does not elaborate on other behaviors like timeout effects or error handling.

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?

Concise, front-loaded purpose, efficient sentences. No unnecessary text; every sentence adds value.

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?

Covers core behavior, command format, and security. Lacks details on return format (e.g., stdout/stderr handling) and error scenarios, but reasonable given no output schema and typical use.

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 baseline is 3. Description adds value by emphasizing security aspect of command array format and implying default timeout. Adds nuance beyond 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?

Clearly states 'Execute a command in a Kubernetes pod or container and return the output', specifying verb, resource, and output. Distinguishes from sibling tools like kubectl_logs that read logs.

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?

Provides explicit guidance on command format (array of strings) and security implications (no shell interpretation). Could be stronger on when to use this versus sibling tools like port_forward or kubectl_get.

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