MCP server for generating images using Google's Imagen 3 model via the Gemini API
Single tool 'generate_image' has a clear verb-based name and reasonable description (140 chars, within 10-1024 range). Input schema is present with proper JSON Schema using schemars derive macro. However, critical issues undermine quality: (1) Output schema is NOT documented, the tool returns a string URL but no structured format is specified, violating pattern:tool and mxe:strip-api-responses; (2) No error handling guidance, errors return plain strings without recovery hints (e.g., 'No images were generated' gives no next step); (3) No input validation beyond aspect_ratio check, 'prompt' parameter lacks length/content constraints; (4) Missing parameter descriptions for aspect_ratio despite inline comments in code; (5) Tool description mentions markdown usage but does not explain what happens on failure or rate limits. The implementation shows competent error handling internally (logging, validation) but none of this is exposed to the LLM in tool definitions.
Generate an image based on a prompt. Returns an image URL that can be used in markdown format like  to display the image
Output schema not documented. Tool returns string URL but no structured response schema is defined. LLMs cannot plan downstream usage or extract chaining IDs.
No error recovery guidance. Errors return plain strings ('No images were generated') without suggesting next steps or alternative actions for the LLM.
Missing 'prompt' parameter constraints. No length limit, language validation hint, or content guidelines documented in schema. Parameter description exists in code comment but not visible in schema definition.
Aspect ratio validation only documented in implementation, not in parameter description. Description says 'Supported values are...' but does not say what happens if an invalid value is passed.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 49 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 17 | - | v1 |
No rate limiting, quota, or cost guidance documented. External API call to Gemini could fail under quota, no retry strategy or backoff guidance for LLM.
Tool description references markdown formatting but does not explain prerequisites (GEMINI_API_KEY env var must be set), failure modes (safety filters), or when to retry.