MCP Server for AST static analysis to identify prohibited imports and syscalls in Python code
Single tool with minimal definition quality. Tool name 'audit_code_safety' lacks action verb clarity (should be 'audit_code' or 'check_code_safety'). Description is adequate (89 chars, within 10-1024 range) but lacks WHEN to use it and what happens on violations. Input schema present but parameter 'code' has NO description, violates critical rule that every parameter needs a description. No output schema documented. No error handling guidance for LLMs. Tool is READ_ONLY which is correct, but no tool annotations present (readOnlyHint missing). Overall definition is sparse and would not pass production code review.
Perform AST static analysis to identify prohibited imports and syscalls.
Parameter 'code' lacks description. Critical rule violation: every parameter must have a description explaining what it controls. LLMs cannot infer that this is Python source code to audit.
No output schema documented. LLMs need to know what fields to expect in the response (safe, violations_count, violations array structure). Without this, agents cannot plan downstream actions or extract data reliably.
Tool name 'audit_code_safety' is vague. Does it audit for safety issues, or does it guarantee safety? Rename to 'check_code_for_unsafe_calls' or 'audit_code_violations' for clarity. Current name does not start with a clear action verb.
No error handling guidance. If code has a SyntaxError, the tool returns a structured response, but the description does not explain what the LLM should do if violations are found. Should it suggest remediation? Fail the task? Retry?
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 43 | 2026-07-28+ | v2 |
No tool annotations. Tool is READ_ONLY but lacks readOnlyHint in schema. This prevents clients from optimizing caching or parallelization. Add 'readOnlyHint: true' to tool metadata.