Skip to main content
Glama
sandraschi

Windows Operations MCP

by sandraschi

winops_container_exec

Runs commands inside a specified Docker container, piping stdin directly to the process. Returns JSON with stdout, stderr, and exit code for automation.

Instructions

Execute a command inside a Docker container.

Uses subprocess directly (not CMD/PowerShell wrapper) to avoid nested-quoting issues and list2cmdline mangling. stdin_data is piped directly to the container command — no need for docker cp + exec dance.

Return Format

{"success": bool, "stdout": str, "stderr": str, "exit_code": int}

Examples

exec(container="postgres", command="psql -U user -d db -c 'SELECT 1'")
exec(container="python-app", command="python /tmp/run.py", stdin_data="input data")
exec(container="nginx", command="nginx -t", timeout_seconds=10)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userNoUser to run as (e.g. 'root').
commandYesCommand to execute inside the container.
workdirNoWorking directory inside the container.
containerYesContainer name or ID.
stdin_dataNoText to pipe to stdin of the command.
timeout_secondsNoHard timeout 1-300s.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

It discloses implementation details beyond the annotations: direct subprocess invocation, avoidance of list2cmdline mangling, and stdin_data being piped straight to the container command. It also specifies the return format. It does not add a side-effect warning for arbitrary commands, but the annotations already cover the non-destructive hint context.

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 front-loaded with a one-line purpose, followed by a concise implementation note, a compact return-format block, and three clear examples. Every section earns its place with no redundant filler.

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

Completeness5/5

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

Despite having six parameters, the description covers rationale, usage patterns, threading of stdin, timeout behavior via examples, and the return contract. This is complete for a container command-execution tool and leaves no significant ambiguity.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline applies. The examples illustrate valid combinations of container, command, stdin_data, and timeout_seconds, but the prose adds no additional parameter semantics beyond what the schema already documents.

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 first sentence is a specific verb+resource statement: 'Execute a command inside a Docker container.' Examples further clarify it runs commands in containers, which distinguishes it from siblings like winops_container_cp (file copy) and winops_cmd_cmd/PowerShell (host command wrappers).

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

Usage Guidelines5/5

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

The description explicitly contrasts with alternatives: 'not CMD/PowerShell wrapper' and 'no need for `docker cp` + exec dance.' This gives agents direct when-not guidance and names the relevant alternatives, which is exactly what this dimension expects.

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/sandraschi/windows-operations-mcp'

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