Cloudflare Worker — MCP server for AI image generation. Supports: Google Imagen 4 (via Gemini API), DALL-E 3 (OpenAI). Storage: Cloudflare R2
Three tools with complete input schemas and descriptions. Naming follows verb_noun pattern (create_visual, list_visuals, get_visual_snippet). Descriptions are present and contextual (avg 150 chars), exceeding the 10-char minimum but below the 50-200 char LLM-optimized range. All parameters have type definitions and descriptions. However, output schemas are not documented, responses are inferred from code (JSON metadata, image list, snippet code). Error handling is minimal; no recovery guidance or categorization. No tool annotations (readOnlyHint/destructiveHint). Missing idempotency guarantees for create_visual (timestamp-based filename generation mitigates but not explicit). Composition is sound: three distinct concerns (generate, list, snippet). Parameter constraints use enums effectively (aspect_ratio, engine, snippet_type, style). No secrets exposed as parameters (API keys injected via Env). Baseline: 549 production tools average 18-char names (these are 13-15 chars, good); 94% of A+ tools have docstrings (this server has them); 100% of A+ tools document return types (this server does not).
Generate an image with AI and store it permanently in cloud (R2). Returns: (1) a permanent URL the user can download/embed anywhere, (2) a 200px JPEG thumbnail as an image block so Claude can see the result. Engines: openai = DALL-E 3, google = Imagen 4, auto = keyword-based selection. After generation Claude should describe what it sees and ask if changes are needed.
Get embeddable code snippet (HTML, CSS, Markdown, or URL) for a stored image.
List all images stored in cloud. Returns filenames, URLs, metadata.
Output schemas not documented. LLMs cannot infer response structure (fields, types, nesting). create_visual returns {url, filename, engine, aspect_ratio, created_at, prompt_preview}; list_visuals returns array of {filename, url, size_kb, created_at, engine, prompt}; get_visual_snippet returns snippet code as text. Without documented schemas, agents cannot plan downstream tool calls or extract fields reliably.
Error handling lacks recovery guidance. If GOOGLE_API_KEY_WORK is missing, the tool throws 'GOOGLE_API_KEY_WORK not configured' with no hint on how to resolve. If image generation fails at the API, the error is passed raw ('OpenAI: ...' or 'Google Imagen: ...'). LLMs need actionable guidance: 'API key not configured, contact admin' or 'Rate limit exceeded, retry in 60s'.
No tool annotations. create_visual is destructive (writes to R2, irreversible) but lacks destructiveHint. list_visuals and get_visual_snippet are read-only but lack readOnlyHint. Annotations help agents reason about side effects and retry safety.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 61 | 2026-07-28+ | v2 |
list_visuals description is minimal (47 chars). Does not explain when to call it, what structure it reveals, or how to use results. Baseline: A+ tools average 194 chars. Expand to: 'List all stored images with metadata (filename, URL, size, creation date, engine used, original prompt). Call this first to discover available images before requesting snippets or regenerating.'
create_visual filename parameter lacks validation guidance. Description says 'Auto-generated if omitted' but does not specify format constraints (allowed characters, max length, extension handling). Code strips extension and appends .png, but LLMs cannot infer this. Add: 'Alphanumeric, hyphens, underscores only. Max 100 chars. Extension (.png) added automatically.'