Skip to main content
Glama
htrixtec

MCP Server Kubernetes

by htrixtec

exec_in_pod

Destructive

Execute commands in Kubernetes pods securely by providing command as an array of strings, returning output 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)
Behavior3/5

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

The annotations already provide destructiveHint: true, so the description's additional context about no shell interpretation adds some value. However, it does not detail potential destructive effects or error handling, but it does not contradict the annotations.

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 two sentences, directly stating the purpose and key usage rule. It is front-loaded and contains no unnecessary words.

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

Completeness3/5

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

While the description covers the essential command format and security aspect, it omits details like return format, prerequisites (e.g., pod must be running), error handling, and potential side effects. Given no output schema, more completeness would be beneficial. However, it is still adequate for a simple exec tool.

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. The description adds the important constraint that the command array must have the executable as the first element, and clarifies no shell interpretation. This adds meaningful guidance beyond the 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 clearly states the tool executes a command in a Kubernetes pod and returns output, specifying the command must be an array of strings. This distinguishes it from sibling tools like kubectl_generic or kubectl_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?

The description explains the required command format (array of strings) and notes that shell interpretation is avoided for security. However, it does not explicitly state when to use this tool over alternatives like kubectl_generic or when not to use it.

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

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