Skip to main content
Glama

ai_image

Read-only

AI image generator (text to image) — Generate an image from a text prompt with FLUX.1 [schnell] on Workers AI: returns a 1024x1024 JPEG as base64 plus a ready data: URL. Params: prompt= (required, up to 2000 chars), steps= (1-8, default 4). Prompts are screened by Llama Guard; flagged prompts return 400 and are not charged. Apache-2.0 model, images usable commercially. For the OpenAI-compatible version POST /v1/images/generations. Price: $0.02 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>"
    },
    "name": "ai_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptYesA minimalist flat logo of a paper airplane, blue and white

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (readOnly/openWorld/non-destructive), the description discloses the return payload shape, content screening behavior ('Prompts are screened by Llama Guard; flagged prompts return 400 and are not charged'), licensing ('Apache-2.0 model, images usable commercially'), and cost ('$0.02 USDC, Base, via x402'). Those are exactly the operational facts an agent needs before spending money on a call.

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?

It is dense and front-loaded: purpose and output first, then params, then screening/licensing/pricing. Every sentence carries information, though the pricing and license clauses could be trimmed without losing call-critical detail.

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

Completeness4/5

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

For a single-parameter, no-output-schema tool, the description covers return format, cost, screening failure mode, and licensing — far more than the minimum. The main completeness defect is the phantom 'steps' parameter, which is not in the schema.

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 description adds real meaning for prompt (required, up to 2000 chars) that the schema lacks — the schema's 'description' for prompt is only an example string ('A minimalist flat logo of a paper airplane...'). However, it documents a 'steps=' parameter (1-8, default 4) that does not exist in the input schema, which would lead an agent to send an argument that gets rejected.

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 definition opens with a specific verb+resource ('AI image generator (text to image)') and names the exact model and direction ('FLUX.1 [schnell]', 'Generate an image from a text prompt'), which cleanly separates it from inverse tools like ai_image_describe. It also states the output artifact (1024x1024 JPEG base64 + data URL), so an agent knows exactly what it gets.

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?

It gives clear context for when to call it (text prompt in, image out) and points to an alternative path for the OpenAI-compatible route ('POST /v1/images/generations'). It lacks explicit when-not-to-use guidance relative to sibling tools, but the text-to-image direction makes the intended use unambiguous.

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