Skip to main content
Glama

container_exec

Executes shell commands inside a running Docker container and returns output, automatically redacting secret values like passwords and tokens.

Instructions

Executes a shell command inside a running container and returns its output. Values that look like secrets (PASSWORD=, "token": "...", etc.) are redacted before being returned. Args: container_name: Docker Container name command: shell command to run inside the container, e.g. "ls -la /app"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
container_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior2/5

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

Annotations are absent, so the description carries full responsibility for disclosing behavior. It mentions secret redaction, which is a useful behavioral detail, but it does not disclose that executing commands can have side effects on the container or host, whether the command runs with elevated privileges, or any failure modes. For a tool that executes arbitrary shell commands, this lack of cautionary information is a significant gap.

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 exceptionally concise, with a single purpose sentence followed by a two-item argument list. Every word earns its place: it states the action, the secret-redaction behavior, and the parameter meanings in a compact format. It is front-loaded with the core purpose and avoids any redundant phrasing.

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 tool is simple with only two parameters, both documented in the description. It has an output schema, so return-value details are not required. The description covers the core purpose, the prerequisite that the container must be running, and the redaction behavior. It does not mention edge cases like command timeouts or environment variables, but given the tool's simplicity and the presence of an output schema, it is sufficiently complete for an agent to call it correctly.

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 description coverage is 0%, so the description must compensate by explaining parameters. It does so effectively: it states 'container_name: Docker Container name' and 'command: shell command to run inside the container, e.g. "ls -la /app"'. This adds meaning beyond the raw schema names and provides a concrete example for the command parameter. The only minor miss is not elaborating on the output format, but that is covered by the output 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 a specific action: 'Executes a shell command inside a running container and returns its output.' It identifies the resource (a running container), the action (executing a shell command), and the outcome (returning output). This distinguishes it from siblings like container_logs (which retrieves logs) and container_inspect (which inspects configuration), so an agent can immediately understand its unique role.

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 usage context by specifying 'inside a running container,' but it does not explicitly state when to prefer this tool over alternatives or mention exclusions. There is no reference to sibling tools for comparison, leaving the agent to infer that this is for arbitrary command execution. It provides clear context but lacks explicit when/when-not guidance, so it falls at the baseline for this dimension.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/Chandrakant1988/https-github.com-Theo-Gkisis-mcpdockery'

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