Skip to main content
Glama
jahrulnr

mcp-docker-agentic

by jahrulnr

docker_exec

Execute shell commands inside a Docker container, with configurable stdin, working directory, environment, timeout, and acceptable exit codes. Supports background jobs for detached execution.

Instructions

Execute an intentional shell command inside a Docker container. Supports stdin, cwd, env, custom output limit, and acceptable exit codes. Set background=true to run a command detached and get a job_id; stdin is not allowed for background jobs. Use docker_exec_result to poll/wait and docker_exec_kill to stop or clean up.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory inside the container.
envNoExtra environment variables for the command.
stdinNoText to write to the command's stdin. Not allowed when background=true.
commandYes
ok_codesNoExit codes to treat as success in addition to 0.
containerYesDocker container name or id.
backgroundNoRun the command detached and return a job_id instead of waiting for completion.
timeout_msNoTimeout for non-background executions.
max_output_bytesNoMaximum stdout/stderr bytes to capture for non-background executions.
Behavior4/5

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

With no annotations, the description carries the full burden and does well by disclosing supported inputs (stdin, cwd, env, output limit, exit codes) and the background/detached behavior with job_id. It also mentions the interdependence with result/kill tools. It does not detail return format or timeout failure behavior, so it is not fully exhaustive.

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?

Three sentences, each earning its place: purpose, feature list, and background behavior with sibling pointers. Perfectly sized and front-loaded, with no fluff.

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?

For a 9-parameter tool with no output schema, the description covers execution modes, input options, and follow-up tools. It omits explicit return structure and timeout behavior, but the schema covers defaults and limits. Overall adequate for effective tool selection.

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 89%, so the baseline is 3. The description adds useful semantics by explaining that background=true returns a job_id and that stdin is incompatible with background jobs, which goes beyond the raw schema. It also maps 'custom output limit' and 'acceptable exit codes' to max_output_bytes and ok_codes.

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 shell command inside a Docker container. It distinguishes itself from siblings by explicitly referencing docker_exec_result and docker_exec_kill as follow-up tools, making the purpose unambiguous. The word 'intentional' hints at non-interactive use, further clarifying its role.

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?

It provides clear context for background execution and notes that stdin is not allowed in background mode. It also directs users to docker_exec_result for polling and docker_exec_kill for cleanup. However, it does not explicitly compare with docker_interactive_exec or state when not to use this tool, so it lacks exclusions.

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/jahrulnr/mcp-docker-agentic'

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