Skip to main content
Glama

generate_image

Create an image from a text prompt and save it to disk, using ChatGPT/Codex when signed in or a free FLUX backend otherwise. Returns the saved path or a job ID for long generations to poll.

Instructions

Generate an image from a text prompt and save it to disk. Uses the ChatGPT/Codex plan when signed in, otherwise a free FLUX backend. Returns the image and saved path, or a job_id when generation takes longer than ~50 seconds; in that case call get_image_job with the job_id.

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

Input Schema

NameRequiredDescriptionDefault
sizeNoOutput size. Defaults to 1024x1024.
promptYesDetailed description of the image: subject, setting, composition, lighting, style, and any constraints.
backendNoauto (default) tries the ChatGPT/Codex plan, then falls back to free FLUX. Use 'pollinations' to force the free backend.
filenameNoOptional base filename, e.g. 'hero-banner'. The extension is chosen automatically.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does well: it discloses backend selection logic, the disk-write side effect, the time-based async cutoff, and both possible return shapes. It omits whether an existing file is overwritten, error behavior, and any rate or plan limits.

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?

Three sentences, each earning its place: purpose first, backend behavior second, return/async contract third. No filler or hedging, and the most decision-relevant information (the get_image_job handoff) is front-loaded in the final position it needs to be for an agent to act on.

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 four-parameter tool with no output schema, the description supplies the return contract (image plus saved path, or job_id), the async recovery path, and the backend fallback semantics. Nothing an agent needs to decide whether to call it, and what to do afterward, is absent.

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?

Schema coverage is 100%, so the schema already documents size, backend, and filename in detail. The description complements this with the fallback ordering that 'auto' triggers, which is behavioral rather than a restatement of the schema, so nothing is missing on the parameter side.

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 an image from a text prompt") plus the observable side effect ("save it to disk"). It also names the follow-up tool get_image_job, so an agent can distinguish the synchronous path from the async one without inspecting sibling schemas.

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 clear operational context: it will use the ChatGPT/Codex plan when signed in and fall back to FLUX otherwise, and it names the exact condition (~50s overrun) under which the agent must switch to get_image_job. It does not mention image_backend_status or when to prefer forcing a backend, so it stops short of explicit alternatives guidance.

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

Deploy Server

Other Tools