MCP Server implementation for recraft.ai using the Model Context Protocol SDK
Server has 11 tools with explicit schemas and descriptions. Naming follows verb_noun convention (generate_image, remove_background). Descriptions are present but brief (avg ~60 chars, below 194-char baseline). Schemas use Zod with type definitions visible. Critical gaps: parameter descriptions are minimal or missing (e.g., 'controls' object lacks detail), no output schema documentation, error handling is basic (UserError wrapping only), and no guidance on when to use similar tools (e.g., crisp_upscale vs creative_upscale distinction unclear). File I/O operations (save_image_to_disk, generate_image with save_to_disk) lack path traversal validation and security warnings.
Create a style by uploading reference images
Enhance image with creative upscale for improved details
Enhance image resolution with crisp upscale
Generate an image from a text prompt with optional saving to disk
Get information about the current user
Transform an existing image based on a text prompt
Inpaint (edit) parts of an image using a mask
Parameter descriptions are minimal or absent. 'controls' (object type), 'text_layout' (array), 'file' (Buffer/File), and 'files' (array) lack detail on structure, valid keys, or format. LLMs cannot infer what these parameters accept.
No output schema documentation. Tools return image data (url, b64_json) or user info, but response structure is not formally documented. LLMs cannot plan downstream calls or extract fields reliably.
Ambiguous tool naming for upscale variants. 'crisp_upscale' vs 'creative_upscale', descriptions do not explain when to use each. LLMs will struggle to choose between them without explicit differentiation.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 49 | <=2025-11-25 | v2 |
Remove the background from an image
Replace the background of an image
Save an image response to disk in a specified folder
Vectorize an image to SVG format
File I/O operations lack path traversal and security validation. 'save_image_to_disk' accepts arbitrary 'file_path' without sanitization. No warnings about directory permissions, disk space, or path injection risks.
Error handling is minimal. Only UserError wrapping; no recovery guidance, categorization (retryable vs fatal), or actionable messages. E.g., 'Failed to generate image: No image data received' does not tell LLM what to do next.