The mcp-shell server contains a single tool, run_shell, with critical quality and security deficiencies. The tool name 'run_shell' is generic and does not follow verb_noun conventions (should be 'execute_shell_command'). The description is minimal (60 chars, below baseline of 194 chars), provides no context on WHEN to use the tool, and does not communicate that this is a DESTRUCTIVE, state-modifying operation. The input schema is present but extremely sparse: it contains only a 'command' parameter with type 'string' and a minimal description ('Shell command to execute'), no constraints, no format guidance, and no examples of valid usage patterns. Critically, there is no input validation, no error handling guidance, no output schema documentation, and no mention of shell-specific risks (command injection, path traversal). The server comment itself ('Very simple, dangerous. Better to whitelist or sanitize') demonstrates awareness of the vulnerability but implements NO mitigations. The tool violates multiple critical security patterns: no input sanitization despite shell=True, no parameter constraints or enums, and no permission gating. No structured output schema is visible. Error handling returns raw stderr without actionable recovery guidance. This server would fail immediate code review by any security-conscious team.
Very simple, dangerous. Better to whitelist or sanitize.
Generic tool name 'run_shell' lacks action verb clarity. Should follow verb_noun pattern (e.g., 'execute_shell_command'). LLMs cannot infer from 'run_shell' alone whether this executes arbitrary commands or a restricted whitelist.
Description is 60 characters, below the baseline 194-char average and far below the 10 - 1024 recommended range. Does not answer WHAT the tool does (execute arbitrary shell commands), WHEN to use it, or state that this is DESTRUCTIVE and state-modifying. LLMs cannot make informed selection decisions.
No input validation or sanitization despite shell=True and subprocess.run(). Code directly passes LLM-provided input to shell, enabling command injection. The 'command' parameter accepts arbitrary strings with no constraints (no enums, no regex pattern, no length limits, no whitelist).
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 18 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 18 | - | v1 |
'command' parameter has minimal description ('Shell command to execute'). Does not specify format, valid syntax, allowed commands, or examples. Violates the 'describe the expected format, range, and allowed values' requirement.
No output schema documented. Function returns either stdout (on success) or stderr (on error) as a plain string. LLMs cannot plan downstream operations or extract structured data. Violates 'Document the output schema' requirement.
Error handling returns raw stderr without actionable recovery guidance. A failed command produces 'Error: <raw stderr>', which tells the LLM nothing about why it failed, whether to retry, or what to try next. Does not follow 'Error responses must tell the LLM what to do next' pattern.
No permission gating, audit logging, or access control. Any agent calling this tool can execute any shell command with the server process's privileges (potentially root if deployed in a container). Violates 'Gate destructive or sensitive tools behind permission checks' and 'Log who called what tool' requirements.
No confirmation step, dry-run capability, or idempotency guarantees. Agents can invoke destructive commands (rm -rf, DROP DATABASE, etc.) without confirmation. Violates 'Irreversible operations should support a dry-run or confirmation step' pattern.
No timeout configured for subprocess.run(). If a long-running or hung command is invoked, the entire MCP server blocks indefinitely, hanging all connected clients. Should set timeout with explicit error and retry guidance.