Skip to main content
Glama

APEX AI, LLM, Embeddings, OCR & Media

Image generate

image_generate
Read-onlyIdempotent

Generate a 1024x1024 JPEG image from a text prompt with FLUX.1 Schnell on Cloudflare Workers AI ($0.005). Sexual content, minors and graphic violence refused before payment. $0.005 per call over x402 (USDC on Arc, Base or Solana, or XNT on X1). Call once without payment for the terms, sign them with your own wallet, call again with payment.

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": "image_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepsNoOptional diffusion steps 1-8 (default 4).
promptYesText description of the image to generate (3 to 1000 chars).
paymentNoa signed x402 payment (the base64 payload you would put in PAYMENT-SIGNATURE). Pass it and the purchase completes inside this tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing cost ($0.005 per call), the accepted payment rails, the pre-payment refusal policy, and that purchase completes inside the second call. The remaining gap is the return format: with no output schema, the agent is not told whether the JPEG comes back inline (base64), as a URL, or as an artifact reference. There is also mild tension with idempotentHint=true, since each call re-charges and generation is non-deterministic.

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 core operation and output spec, then the policy, then the payment mechanics. The only waste is the repeated $0.005 figure (stated in sentence one and again in sentence three), which could be consolidated.

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 paid, policy-filtered generation tool the invocation path is fully covered: cost, rails, refusal rules, and the exact two-call sequence. The one thing it should state and does not is the shape of a successful response (URL vs. inline bytes) or the shape of a refusal, which matters given there is no output schema.

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 `prompt` and `steps` are already documented. The description still adds real value for `payment`: it explains the two-phase terms-then-payment protocol and what signing entails, which the schema alone does not convey.

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 (Generate), resource (1024x1024 JPEG image), input (text prompt), and even the model and platform (FLUX.1 Schnell on Cloudflare Workers AI). The function is unmistakably distinct from image_analyze and image_ocr without needing to open schemas.

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?

Gives explicit procedural guidance for the two-step flow: call once without `payment` to obtain terms, sign with your own wallet, then call again with `payment`. It also states the content-policy boundary (sexual content, minors, graphic violence refused before payment), so the agent knows both how to invoke and what will be rejected.

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.