Skip to main content
Glama

docker_exec

Execute shell commands inside a Docker container on a remote Linux host via SSH, with automatic command quoting handled for you.

Instructions

Run cmd inside a container with sh -c; write it as you would inside the container, the tool does the quoting.

Input Schema

NameRequiredDescriptionDefault
cmdYes
hostYes
timeoutNoSeconds, default 60
containerYesContainer name or id
max_charsNoPer-stream output cap, default 8000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses shell wrapping and automatic quoting, but omits permissions/security implications, container-running preconditions, output truncation behavior, timeout behavior, and mutation side effects.

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?

One front-loaded sentence with no wasted words. The execution mechanism and quoting behavior are stated efficiently.

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

Completeness2/5

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

For an arbitrary container command-execution tool with no annotations and no output schema, the description is too sparse. It should at least clarify host/container targeting, timeout/output-cap behavior, and the fact that commands may mutate container state.

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

Parameters2/5

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

Adds useful meaning for `cmd` by explaining it is shell text and that the tool handles quoting. However, schema coverage is only 60%, and `host` is undocumented in both schema and description; timeout and max_chars are also not addressed in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: running a command inside a container via `sh -c`. This clearly separates it from docker_ps/docker_logs, though it does not explicitly distinguish it from the sibling `exec` tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains how to phrase the command but not when to use this tool instead of `exec` or other command-running siblings. No preconditions, exclusions, or alternative-selection guidance are provided.

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