An MCP server that reads local code files, sends them with context to Deepseek LLM for correction, and overwrites the original files with corrected versions.
Single tool with destructive behavior, moderate schema presence, but critical safety and design gaps. The tool modifies local files without confirmation, lacks output schema documentation, and has no error classification or recovery guidance. The naming is clear (correct_code_file), and descriptions exist but are insufficient for production use. Security mitigations (ALLOWED_ROOT check) are present but insufficient for an irreversible operation.
Reads a local code file, sends it with context to an LLM for correction, and overwrites the original file with the corrected version. WARNING: THIS TOOL MODIFIES LOCAL FILES. USE WITH EXTREME CAUTION. ENSURE BACKUPS.
Irreversible file modification without confirmation or dry-run support. Tool destructively overwrites the original file with LLM-generated output. Agents can invoke this with no safeguard, causing permanent data loss if the LLM produces incorrect code.
Output schema not documented. The tool returns a string (success/error message) but the response structure is not formally specified. LLMs cannot plan downstream actions or validate results because they don't know what fields to expect.
No error classification or recovery guidance. Errors are returned as plain strings (e.g., 'Error: Failed to read the original file...'). The LLM has no signal whether to retry, ask the user, or abort. Error messages do not indicate next steps.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 47 | <=2025-11-25 | v2 |
Code extraction fragility. The tool uses regex to extract code from markdown blocks (```). If the LLM fails to return a code block, the function returns None and the tool fails silently with a generic error. No guidance on why extraction failed or how to retry with clearer instructions.
Parameter description for 'context_or_instructions' is minimal. It says 'Error logs, stack traces, or instructions on what to fix' but does not explain format expectations, size limits, or how incomplete/ambiguous context affects correction quality. LLMs cannot infer optimal input.
Tool description emphasizes danger but provides no mitigation strategy within the tool itself. The description says 'USE WITH EXTREME CAUTION. ENSURE BACKUPS' but the tool has no built-in safeguards (confirmation, dry-run, rollback capability). Warnings are not substitutes for design patterns.
No idempotency guarantee. If the tool fails after reading the original file but before writing, and the agent retries, the LLM may receive different input (the partially corrected file if it was partially written). The operation is not safely retryable.
LLM prompt hardcoded with incomplete instructions. The prompt includes 'Original Code:' and then 'Provide the corrected code below:' but the actual code is never interpolated into the message. The LLM receives an incomplete context, severely degrading correction quality.