Skip to main content
Glama

AI image generation, text to image (FLUX.1 schnell): photo, illustration, logo, 3D; style-faithful, safety-screened

ai_image
Read-only

Generate one 1024×1024 image from a short prompt (max 600 chars) with FLUX.1 [schnell] (Apache-2.0) on our Cloudflare Worker via Workers AI. Before generation we detect the medium you asked for (photo, illustration, flat vector, logo/icon, watercolor, oil painting, pencil sketch, ink, anime, comic, pixel art, 3D render, digital painting) and rewrite the prompt to honour it, with style-specific quality guidance (e.g. real lens and natural light for photos, clean 2D linework for illustrations); no medium named = natural photo. The medium is never switched and nothing unrequested is added; set style to force one, or enhance=false to use your prompt as written. Both your prompt and the final prompt go through our content screen (keyword rules + an LLM check): sexual content, minors, violence/weapons, real or identifiable people, hate and illegal content are refused with 400 and you are not charged. The image itself is not classified. Returns a base64 JPEG plus the final prompt and detected style. Capped at a small number of images per day: 503 (not charged) when used up. Price: $0.01 USDC on Base per call, paid with x402 (MCP transport: an unpaid call returns the x402 PaymentRequired object; retry with params._meta["x402/payment"]). Same tool over HTTP: POST /api/ai/image.

Input Schema

NameRequiredDescriptionDefault
stepsNo1-8, default 6
styleNooptional override; default auto (detected from prompt, photo if none)
promptYeswhat to make, max 600 chars
enhanceNodefault true; false = use the prompt as given

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Far exceeds what readOnlyHint/openWorldHint/idempotentHint convey: it discloses the two-stage content screen and what is refused, that refusals return 400 without charge, daily quota exhaustion returning 503 without charge, the exact price ($0.01 USDC on Base), the x402 payment handshake and retry mechanism, and that the generated image itself is not classified. This is unusually rich for a mutation-and-billing operation.

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

Conciseness4/5

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

Front-loaded with the action, size, and model before style detection, screening, billing, and error codes. It is dense and long, but nearly every clause carries operational value (screening, quota, payment); only the trailing HTTP endpoint line feels like padding for an MCP caller.

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?

With no output schema, the description still specifies the return payload (base64 JPEG plus final prompt and detected style), and covers failure modes (400 refusals, 503 quota) and the payment flow. An agent has everything needed to call it correctly and interpret both success and failure.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real semantics: what 'style' forces, that the medium is never switched, and that enhance=false uses the prompt verbatim. The 'steps' parameter is not explained beyond the schema's '1-8, default 6', leaving one small gap.

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?

States a specific verb and resource (generate one 1024×1024 image from a short prompt) plus the exact model and hosting (FLUX.1 [schnell] on Cloudflare Workers AI). It is trivially separable from the other AI siblings (ai_classify, ai_embed, ai_extract, ai_transcribe) which operate on text/audio rather than producing images.

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

Usage Guidelines4/5

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

Gives concrete operating guidance: default behavior (auto-detect medium, photo if none), how to override (set style, or enhance=false), and the char limit. It does not explicitly contrast with sibling tools, but among this set there is no competing image-generation alternative, so context is effectively clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources