Remove secrets, PII, comments, and prompt-injection markers from source code with automatic logging and smart detection
Sanitize-MCP has three tools with basic schemas and descriptions, but significant gaps prevent production use. Tool names lack clear action verbs (sanitize-code vs sanitize_code convention). Descriptions are present but generic (avg ~100 chars, below 194-char baseline). Parameters lack comprehensive constraints, no enums, ranges, or format specifications. Output schemas are undocumented; responses are JSON strings rather than structured objects. Error handling is absent; no recovery guidance or categorization. The server logs activity but does not expose structured error messages to guide LLM recovery. Security concern: logging previews of sanitized content could leak sensitive data.
View recent sanitization activity from dist/sanitization.log to see what data has been processed.
Remove secrets, PII, comments, and prompt-injection markers from source code. All activity is automatically logged to dist/sanitization.log.
Automatically detects and sanitizes sensitive content. Use this for composer integration.
Tool names use kebab-case (sanitize-code) instead of snake_case (sanitize_code) and lack clear action verbs. 'sanitize-code' and 'smart-sanitize' are vague about what distinguishes them; LLMs will conflate them.
Output schemas are undocumented. Tools return JSON strings wrapped in text content, not structured objects. LLMs cannot extract fields reliably or chain results to downstream tools.
No error handling or recovery guidance. If sanitization fails or logs are unavailable, tools return no actionable error message. LLMs cannot self-correct or retry intelligently.
Parameter 'count' in get-sanitization-logs lacks range constraints. Description says 'max: 100' but no min/max validation in schema. LLMs may pass negative or absurdly large values.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 43 | <=2025-11-25 | v2 |
Logging previews of sanitized content (first 100 chars) to dist/sanitization.log risks re-exposing sensitive data. Log structure should not include content previews, only metadata (counts, timestamps).