MCP server for generating beautiful code snippet images
Single-tool server with a well-structured schema and reasonable descriptions. The tool name is action-oriented (create_code_image), the description is clear and contextual (118 chars, within 10-1024 range), and all parameters have types and descriptions. However, the schema lacks error handling guidance, output structure documentation, and several parameter descriptions are thin (e.g., 'theme' lacks guidance on when to use each theme). Parameter constraints are enforced via defaults rather than enums, which is a missed opportunity for LLM self-correction. The tool performs a single, idempotent write operation with side effects (disk I/O), but the description does not explicitly state this. No output schema is documented, forcing the LLM to infer the structure of the returned image and filepath. Security and permission gates are absent, the tool writes to a user-specified output directory with no validation. Overall, the definition is functional but falls short of production-grade polish expected in a B+ tier.
Generate a beautiful code snippet image with syntax highlighting and styling
Output schema not documented. The tool returns an image as base64 and a filepath, but the response structure is inferred from code rather than explicitly documented in the tool description or a formal output schema. LLMs must reverse-engineer the structure from the code snippet shown in the return statement.
Theme parameter lacks enum constraint and guidance. The description lists five valid themes (dracula, monokai, github, solarized-dark, solarized-light) but does not enforce them as an enum. LLMs may hallucinate invalid theme names like 'nord' or 'atom', causing failures. Should use z.enum([...]) to constrain the parameter.
Language parameter description lacks concrete guidance. It states 'e.g. javascript, python, typescript' but does not explain fallback behavior (e.g., 'defaults to plaintext if language is not recognized by highlight.js'). No enum constraint, so LLMs may pass unsupported languages.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 54 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 41 | - | v1 |
Numeric parameter constraints are missing. width (default 800) and padding (default 52) have no documented minimum/maximum. An LLM could pass width=1 or padding=-100, causing unexpected rendering. Should add bounds like 'width in pixels (100-4000, default 800)'.
No error handling or recovery guidance. If highlight.js fails to highlight code in an unsupported language, if Playwright crashes, or if disk write fails, the tool returns a raw exception to the LLM. There is no error message telling the LLM what to do next (e.g., 'Try a different language or use plaintext').
Tool description does not state that this is a write operation with side effects. The description 'Generate a beautiful code snippet image...' reads as a pure query. LLMs may not understand that the tool creates files on disk, making them unable to reason about idempotency or retry safety. Should explicitly state 'This tool creates an image file and writes it to disk.'
Security: No validation of outputDir path. An LLM could pass outputDir='/', '..\..\windows\system32', or other dangerous paths. The tool should validate that outputDir is within an allowed safe zone and reject traversal attempts. This is a critical input sanitization gap.
No support for natural identifiers. The tool only accepts machine input (language codes, theme names). A more user-friendly design might accept aliases or display names (e.g., 'dark dracula' instead of 'dracula'). Minor issue but illustrates gap in chat-data-model alignment.