Skip to main content
Glama

generate_image

Generate images with OpenAI gpt-image-2.5 using your own API key, saving them locally and returning file paths plus the cost of each run.

Instructions

Generate an image with OpenAI gpt-image-2.5 using the user's own API key; saves it locally and returns the file paths and cost. Without a requested spec use 2K 16:9 + high (about $0.06). 4K, xhigh, max or several images cost more — tell the user the rough cost first. Always tell the user what each run cost.

Input Schema

NameRequiredDescriptionDefault
nNonumber of images
maskNoabsolute path of a mask PNG (transparent = repaint); requires reference images
nameNoshort file name prefiximg
sizeNoe.g. "2K 16:9", "4K 9:16", "1K 1:1", "2560x1440" or "auto"2K 16:9
modelNogpt-image-2.5-sunburst
promptYesprompt (positive description of the image)
qualityNohigh
moderationNoauto
reference_imagesNoabsolute local paths of reference images, up to 16

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the API-key requirement, local persistence, the returned values (file paths and cost), and a cost-scalation warning for 4K/xhigh/max/multi-image runs. It leaves out failure behavior, rate limits, and moderation effects, keeping it short of a 5.

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 tight sentences with the capability and output first, the default second, and the cost-disclosure obligation last. Every sentence carries information the agent needs.

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 9-parameter generation tool with no output schema, the description covers the essentials: what is produced, where it goes, what it costs, and the default spec. Gaps remain around mask/reference-image prerequisites and model selection, which an agent would have to infer from the schema alone.

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?

Schema coverage is 67%, and the description adds meaning only for size and quality by naming the default combo and which settings raise cost. Mask, reference_images, name, model enum, and n receive nothing beyond the schema, so the description is additive but partial.

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 (image), backing model (gpt-image-2.5), auth model (user's own API key), and side effects (saves locally, returns paths and cost). This is clearly distinguishable from the sibling tools check_connection and get_spending.

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 a concrete default (2K 16:9 + high, ~$0.06) when no spec is requested and instructs the agent to quote cost before doing anything expensive. It does not discuss alternatives or when-not-to-call, but the siblings are unrelated utilities, so the practical guidance is nearly complete.

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