MCP server exposing Agent Zero's code execution capabilities
This server exposes code execution capabilities with basic tool definitions but significant quality gaps. All 4 tools are explicitly defined in main.py with names, descriptions, and input schemas. However, descriptions are minimal (average ~45 chars, well below the 194 char baseline), parameters lack depth documentation, output schemas are not visible in the source, and error handling guidance is absent. The tools accept destructive operations (terminal/Python execution) without confirmation patterns or permission gates. Tool naming follows verb conventions (execute_*, get_, reset_) but parameter naming is generic ('session', 'code', 'command') without type suffixes to disambiguate. No audit trails, rate limiting, or input sanitization visible in the provided code sample.
Execute Python code on the host system using IPython
Execute terminal commands on the host system
Get terminal output from an active session
Reset a terminal session
Missing output schemas. No tool documents what the LLM receives after execution. execute_terminal and execute_python should specify whether output is raw text, structured JSON with stderr/stdout separated, exit codes, or paginated. get_output should document truncation behavior and pagination. Without this, LLMs cannot plan downstream reasoning or extract structured data.
Descriptions are below 50 chars for 3 of 4 tools; none reach 194 char baseline. Tool descriptions lack WHEN/WHY guidance. For execute_terminal and execute_python, missing explicit risk disclosure ('This tool can modify, delete, or destroy data on the host system') despite DESTRUCTIVE risk rating. Minimal descriptions force LLMs to guess intent.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 46 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 35 | - | v1 |
No error handling or recovery guidance. Code shows timeout logic (first_output_timeout, between_output_timeout, max_exec_timeout) but tools do not document what happens on timeout, how to distinguish between 'command still running' and 'command hung', or what the LLM should do next. Missing examples: 'If execution times out, call reset_terminal() with session=X then retry.'
No confirmation or dry-run pattern for destructive operations. execute_terminal and execute_python accept arbitrary code/commands without a --dry-run or --confirm flag. No gate checks for dangerous patterns (rm -rf, DROP TABLE, etc.). Agents can accidentally destroy systems.
Session parameter naming is ambiguous. All tools use 'session' (integer, default 0) but do not explain the mapping. Is session=0 the 'default session' or 'no session'? What happens if session=999 does not exist? Does prepare_state auto-create? Code shows prepare_state creates shells lazily, but this behavior is not documented in tool descriptions.
Parameter descriptions are minimal or missing. 'session' described as 'Session ID for maintaining shell state' (39 chars), no explanation of valid range (0 - 65535?), whether IDs are global or per-agent, persistence, or cleanup. 'reason' in reset_terminal is 'Optional reason for reset', does not explain what 'reason' does (logging only? triggers different reset behavior?).
No input validation or constraint documentation. 'code' and 'command' are free-form strings. Code sample shows logic to escape/quote commands (shlex.quote) but this is not exposed. No documentation of code/command size limits, forbidden patterns (e.g., 'exit', 'logout'), or sandboxing assumptions (e.g., 'runs in /tmp', 'network access enabled').
No pagination or result limiting documented. Code shows truncate_text_agent() with 1MB threshold, but this is not advertised in tool output schema. For get_output, unclear if large buffers are truncated, split across multiple calls, or if the tool returns partial results with a continuation token.
No audit logging or permission gates visible. Code uses self.log (Log()) but no permission checks to verify the calling agent/user has authority to execute arbitrary terminal/Python code. No audit trail of who ran what command, when, with what result. In a multi-tenant scenario, this is a critical security gap.