MCP server for executing shell commands with allowlist-based safety controls
Single tool with reasonable naming and clear security model (allowlist), but lacks essential output schema documentation, missing error handling guidance, and no parameter format constraints. Description is solid (176 chars) but parameters lack field-level documentation of expected response structure. Tool is directly visible in main.py with explicit @mcp.tool registration and input schema validation, so not subject to inference penalties.
Execute a shell command and return its output. Only commands whose base (first token) appear in the server's allowlist will be executed. Everything else is rejected before any subprocess is spawned.
Output schema not documented. Tool returns dict with keys stdout, stderr, returncode but LLM has no visibility into structure, types, or when to expect which fields. This breaks downstream tool composition and forces LLMs to guess.
timeout parameter lacks format constraint. Description says 'Maximum time in seconds' but does not specify range (min/max), whether it accepts decimals, or what happens on timeout. LLMs may pass unbounded values.
No error handling guidance. When a command is blocked (returncode=-1, stderr contains allowlist rejection), tool description does not explain this is expected or what the agent should do next. Error responses lack recovery suggestions.
command parameter lacks format specification. No indication of whether shell operators (pipes, redirects, env vars) are supported, whether it's a single command or script, or character encoding. Ambiguity invites invalid input.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 59 | <=2025-11-25 | v2 |
| 2026-03-09 | C | 66 | - | v1 |
Allowlist is hardcoded in source, not exposed to agent or client. Agent cannot discover which commands are permitted without reading source code. Discovery tools (list_allowed_commands) would enable safe exploration.