A Model Context Protocol (MCP) server that provides access to Mermaid diagram documentation.
Single tool with adequate schema but significant gaps in description quality and error handling. Tool name follows verb_noun pattern (get_diagram_doc). Input schema is complete with enum constraint on diagram_name. However, description is verbose (>1024 chars) and includes redundant parameter documentation. No output schema documented. No error handling guidance for missing files or I/O failures. No pagination, no structured output format specified. Tool is read-only but lacks explicit documentation of this safety property.
Retrieve the documentation content for a specific Mermaid diagram. Args: diagram_name (DiagramType): The name of the diagram. Possible values are: 'architecture', 'block', 'c4', 'classDiagram', 'entityRelationshipDiagram', 'examples', 'flowchart', 'gantt', 'gitgraph', 'kanban', 'mindmap', 'packet', 'pie', 'quadrantChart', 'radar', 'requirementDiagram', 'sankey', 'sequenceDiagram', 'stateDiagram', 'timeline', 'userJourney', 'xyChart', 'zenuml'. These are case sensitive strings. Returns: str: The documentation content as a string, or an empty string if the diagram is not found.
Description exceeds 1024 character baseline and duplicates parameter info already in schema. Verbose descriptions waste tokens and bury key details. Should be 50-200 chars stating WHAT, WHEN, and RETURN value.
No output schema documented. LLM cannot plan downstream operations or validate response structure. Must specify: returns string type, expected content format (markdown), and error cases (empty string on not found).
No error handling guidance. Tool silently returns empty string on missing diagram, but LLM has no way to distinguish 'file not found' from 'empty documentation'. Should raise structured error with recovery hint: 'Diagram not found. Available types: [list]'.
No explicit read-only annotation. Tool is safe to retry and has no side effects, but this is not declared. Should include readOnlyHint in tool metadata or description to signal safety to agents.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 45 | 2026-07-28+ | v2 |
Potential path traversal vulnerability. Tool constructs file path from user input (diagram_name.value) without validation beyond enum constraint. If enum is bypassed or docs directory structure changes, could expose unintended files. Validate resolved path is within DIAGRAM_DIR.