Skip to main content
Glama
puspoaditya

Cloudflare Workers AI MCP Server

generate_image

Create images from detailed text prompts using Cloudflare's Flux 1 Schnell model. Specify subject, style, and lighting to produce visual assets like logos or thumbnails.

Instructions

Generate an image from a text prompt using Cloudflare Workers AI (Flux 1 Schnell). Use this tool when the user asks for a picture, illustration, concept art, or visual asset — e.g. logos, scene descriptions, thumbnails, or design mockups. The image is generated by the Flux 1 Schnell model on Workers AI and returned as a base64-encoded string; decode it to obtain the image file (PNG or JPEG depending on the model output). Generation is asynchronous and typically takes a few seconds. Note: Cloudflare applies content moderation — prompts containing NSFW content are rejected with an error. Requires CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN environment variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepsNoNumber of diffusion steps. Default 4, maximum 8 for Flux 1 Schnell. More steps improve detail at the cost of latency.
promptYesDetailed text description of the image to generate. Be specific about subject, style, colors, composition, and lighting for best results.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full behavioral burden and delivers: it discloses the base64-encoded return format (including decode instructions), asynchronous latency ('typically takes a few seconds'), content moderation rejecting NSFW prompts, and required environment variables for auth. This goes well beyond minimal disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five sentences, each earning its place: purpose, use cases, output format, async behavior, moderation, and auth requirements. The most critical info (what it does, when to use) comes first, with no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-param tool with no output schema, the description is self-sufficient: it explains the output (base64, PNG/JPEG), operational characteristics (asynchronous, a few seconds), failure modes (NSFW rejection), and setup needs (env vars). An agent has everything it needs to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% coverage with detailed descriptions for both 'prompt' and 'steps'. The description doesn't add new parameter-specific meaning beyond what the schema includes, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource: 'Generate an image from a text prompt using Cloudflare Workers AI (Flux 1 Schnell).' It clearly distinguishes from sibling tools like chat_completion and embed_text, and provides concrete examples (logos, scene descriptions, thumbnails, design mockups) that settle any ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states 'Use this tool when the user asks for a picture, illustration, concept art, or visual asset' with examples. This provides unambiguous when-to-use direction, and the sibling names (chat_completion, embed_text) make the alternatives obvious even without an explicit 'do not use for' clause.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/puspoaditya/cloudflare-workers-ai-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server