The server provides two tools with complete input schemas and reasonable descriptions. However, several quality issues prevent a higher score: (1) Tool naming is acceptable but not idiomatic, 'generate_diagram' and 'validate_mermaid' start with verbs but lack consistent patterns; (2) Descriptions are present but brief (44-73 chars), below the 50-200 char LLM-optimized range; (3) Parameter descriptions are minimal, many lack actionable guidance on constraints or format; (4) Output schemas are undocumented, no description of what fields are returned, forcing LLMs to reason blindly; (5) Error handling is absent from visible code, no guidance on how to recover from Mermaid CLI failures or invalid input; (6) The tools do not compose, generate_diagram writes to disk but there is no read tool to retrieve the output; (7) One parameter (backgroundColor) accepts free-form strings with only a hint in description ('hex color, named color, or transparent'), inviting invalid values instead of an enum or regex pattern. These gaps are typical of community servers scoring in the C range (60-69).
Tools (2)
generate_diagramwritesource verified69/100
Generate a Mermaid diagram from code and return it as an SVG image
validate_mermaidread onlysource verified72/100
Validate Mermaid diagram syntax and provide feedback
Output schema not documented. Neither tool describes what it returns. generate_diagram likely returns a file path or SVG data, but this is invisible to the LLM, forcing it to guess downstream behavior.
Parameter descriptions lack actionable constraints. 'backgroundColor' accepts 'hex color, named color, or transparent' but no enum or regex pattern, LLM will hallucinate invalid color names. 'mermaid_code' description is purely descriptive with no guidance on size limits, syntax rules, or error recovery.
No error recovery guidance. generate_diagram will fail silently (or crash) if Mermaid CLI is not installed, if the code is invalid, or if file write fails. No tool description tells the LLM what to do when this happens.
Expand tool descriptions to 50-200 characters, including WHAT the tool does, WHEN to call it (vs. the other tool), and what the LLM receives. Example for generate_diagram: 'Render Mermaid diagram code to an SVG, PNG, or PDF file. Use before validate_mermaid to check syntax. Returns file path and format metadata.'
Replace backgroundColor free-form string with enum or regex constraint. Either: (a) add enum: ['transparent', 'white', 'black', 'lightgray'] with description 'Named colors or 6-digit hex (e.g. #FF5733)', or (b) add pattern: '^(transparent|[a-fA-F0-9]{6}|[a-zA-Z]+)$' to the schema.
Add parameter-level error context. For mermaid_code, add: 'Must be valid Mermaid syntax (graph, flowchart, sequenceDiagram, etc.). If validation fails, call validate_mermaid first with this code to identify syntax errors.'
Implement per-parameter error messages in handle_call_tool. When backgroundColor validation fails, return: { error: 'Invalid backgroundColor: got "red123". Must be transparent, a named color, or a 6-digit hex code (e.g. #FF5733).' } This lets the LLM self-correct.
Add a retrieve_diagram tool or extend generate_diagram to optionally return the SVG/PNG/PDF content inline (base64 or as a resource URI). This enables the agent to compose: generate → retrieve → send to user in one workflow.
Score history
Overall score trend
First recorded score · v2 rubric
49/100
Scored
Grade
Overall
Spec posture
Rubric
2026-09-22
F
49
2026-07-28+
v2
Tool descriptions are too brief (44-73 chars). LLM-optimized descriptions are 50-200 chars and should explain WHAT, WHEN, and WHAT IT RETURNS. Current descriptions lack context on when to call each tool or what the output enables.
Tools do not compose. generate_diagram writes to disk but there is no read or retrieve tool. An LLM cannot fetch the generated SVG back without additional external tools. Composition is broken.
Insufficient input validation visible in code. The handle_call_tool function is truncated, but no explicit validation of backgroundColor hex codes, theme enum values, or dimension ranges is visible. LLM will pass invalid values expecting graceful rejection.
validate_mermaid returns unclear result. Description says 'provide feedback' but no description of what success looks like (JSON? Plain text? Error codes?) or what fields are in the response.
validate_mermaid
Document validate_mermaid output explicitly. Clarify: does it return { is_valid: true } on success or detailed error objects? Example: { is_valid: false, errors: [{ line: 5, column: 12, message: 'Unexpected token: -->>' }] }
Add rate limiting context if Mermaid CLI spawning is expensive. If each diagram generation takes 2+ seconds or spawns child processes, document: 'Rendering may take 2-5 seconds per diagram. Recommend batching up to N requests before calling.' This prevents agent timeout spirals.
Clarify file_name behavior. Document: 'File is written to disk in a temporary directory or specified output_dir. Returns the absolute file path. User must retrieve via a separate read tool or shell access, SVG content is not returned inline.'
Add idempotent semantics. If generate_diagram is called twice with the same file_name, does it overwrite or error? Document this so agents know whether retry is safe.