MCP server that validates C4X DSL diagram code and provides resources for C4X generation guidelines and examples
The c4x-validator MCP server exposes a single tool with a clear, well-defined purpose. The tool name follows verb_noun convention (validate_c4x), the description is actionable and specific (explains what it validates, that it reports errors with line/column info, and explicitly states it does NOT fix code), and the input schema is properly structured with a required 'code' parameter that has a clear description. The server demonstrates good foundation patterns: a read-only, idempotent tool with clear error semantics. However, the server lacks output schema documentation (no documented structure for success vs. error responses), lacks tool annotations (readOnlyHint would benefit from explicit marking), and has minimal protocol support (STDIO-only, no resources despite claiming resources=true in features, no progress/cancellation/sampling). The single tool design is appropriate for a validation microservice, but the output contract should be explicitly documented in the tool definition.
Validates a C4X DSL diagram code snippet. Parses the code and returns either success or a structured parsing/syntax error with line and column numbers. Does NOT fix the code, only reports validity.
Output schema not documented. Tool description states it returns 'success or structured parsing/syntax error with line and column numbers' but does not specify the exact response object structure (e.g., {success: boolean, errors: [{line, column, message}]} vs other formats). LLMs cannot plan downstream calls or extract specific fields without knowing the response shape.
Tool annotations missing. A read-only validation tool should declare readOnlyHint: true in its definition. This helps LLMs and clients understand that the tool has no side effects and can be called freely for safety checks.
Error guidance incomplete. Description mentions returning 'parsing/syntax error with line and column numbers' but does not explain what field names the error object uses, what the line/column numbering scheme is (0-indexed or 1-indexed?), or how to use this information for correction. LLMs need explicit recovery instructions.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 66 | 2026-07-28+ | v2 |