Skip to main content
Glama

images_generations

Read-only

OpenAI-compatible image generation (FLUX.1 schnell) — Drop-in OpenAI Images API (POST /v1/images/generations): text-to-image with FLUX.1 [schnell] on Workers AI, 1024x1024 JPEG. Body JSON: prompt (required, up to 2000 chars), optional n (only 1), response_format b64_json (default) or url (returns a data: URL, nothing is hosted), steps (1-8, default 4; more steps = more detail). Prompts are screened by Llama Guard; flagged prompts get 400 content_policy_violation and are not charged. FLUX.1 [schnell] is Apache-2.0, so images can be used commercially. 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": "images_generations"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptYesA watercolor lighthouse on a rocky coast at sunset

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only cover the safe-read profile; the description goes well beyond by disclosing prompt screening via Llama Guard, the exact 400 content_policy_violation failure mode, that flagged prompts are not charged, and the $0.02 USDC x402 payment requirement. It also clarifies that response_format=url returns a data: URL with nothing hosted, and that Apache-2.0 licensing permits commercial use — exactly the behavioral context annotations cannot carry.

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 operation and model, then layered detail in decreasing priority (body params, safety, licensing, price). Dense with parentheticals and slightly run-on, but each clause carries information; little could be cut without losing guidance.

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 single-parameter generation endpoint with no output schema, the description supplies inputs, defaults, output encoding, failure behavior, cost, and licensing — everything needed to call it correctly. Return format is described even though no output schema exists, closing the usual gap.

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

Parameters5/5

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

Adds substantial meaning beyond the schema, whose only property 'description' is an example prompt rather than a constraint: it gives the 2000-char limit, that n must be 1, the b64_json default, the steps range 1-8 with default 4 and its quality tradeoff. This is real interpretation guidance the schema does not supply.

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 concrete verb and resource (text-to-image generation), names the backing model (FLUX.1 [schnell]) and the exact API surface it mirrors (POST /v1/images/generations). An agent knows immediately this produces images at 1024x1024 JPEG, which no sibling tool does.

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?

Explains what the call does and the choices inside it (response_format b64_json vs url; steps cost/quality tradeoff), and discloses the price and payment rail before invocation. It does not name a sibling alternative, but the image-generation purpose is unambiguous — clear context with no explicit exclusions.

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