Mermaid-MCP has significant definition quality gaps. While both tools are explicitly registered with names and basic descriptions, the schema definitions are incomplete, parameter descriptions lack constraint information, and output schemas are entirely undocumented. The generate_chart tool accepts 6 parameters but provides minimal guidance on valid values, formats, or dependencies. The descriptions are present but generic (10-50 chars for params). No error handling guidance is provided to help LLMs recover from failures. The server returns PNG binary data without documenting the response structure, field names, or how downstream tools should handle the output.
将文本描述或Mermaid代码生成为PNG图表
获取可用的CSS模板列表
Parameter descriptions lack constraint information. 'chart_type' accepts 'flowchart, sequence等' in the tool description but no enum is defined in the schema. Parameters like 'width' and 'height' have no min/max bounds specified. LLMs will guess at valid values.
Output schema is completely undocumented. Both tools return PNG binary data wrapped in a dict with 'content', 'mime_type', 'filename', 'description' fields, but this structure is not declared in the tool definition. LLMs cannot plan downstream operations or extract metadata.
Error handling provides no recovery guidance. The code catches exceptions and returns error PNGs, but does not return structured error messages or suggest next steps (e.g., 'Invalid chart_type. Valid options are: flowchart, sequence, gantt, ...'). Errors are rendered as PNG images, making them unreadable to LLMs.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 46 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 37 | - | v1 |
Parameter 'input_text' is required but no format constraints are documented. Is it raw Mermaid code? Natural language? Hybrid? Should it contain node definitions? Edge definitions? The description '用户输入的文本或Mermaid代码' (user input text or Mermaid code) is ambiguous.
Mutually exclusive or dependent parameters are not documented. Are 'css_template' and 'custom_css' mutually exclusive? If both are provided, which takes precedence? The code does not clarify this dependency.
Tool names do not use consistent verb-noun convention. 'generate_chart' is good, but 'list_css_templates' returns PNG data, not a structured list, the behavior is inconsistent with the name. Agents expect list_* tools to return arrays of objects.