Skip to main content
Glama

Generate Image

generate_image

Create 1024×1024 PNG images from text prompts, or edit a reference image by URL using prompt instructions, and get a time-limited download URL.

Instructions

AI 生图(1024×1024 PNG,按张计费,失败不计费):传 prompt 即文生图;再传 init_image_url(参考图公网 URL,png/jpg/jpeg ≤10MB)即图生图(换装/换景/改背景等编辑指令写在 prompt 里)。 本工具一次调用内完成「提交→等待→出结果」,默认最多等 120 秒(wait_seconds 可调 10~300); 出图成功返回 resultUrl(现签下载链接,1 小时内有效,请提醒用户及时下载转存)。 model 留空自动选:文生图=flux2-klein(快而省),图生图=qwen-image-edit-2511;要更高质量可传 z-image-turbo,在线模型与实时牌价先用 list_image_models 查询。 seed(非负整数)可复现同图:同 prompt + 同 seed 生成一致结果。 若等待超时仍未完成,返回 taskNo(任务不丢失、不计排队费),调用 get_image_task 继续查询。

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
seedNo
modelNo
promptYes
wait_secondsNo
init_image_urlNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior3/5

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

Annotations already declare the safety profile (readOnlyHint=false, idempotentHint=false, destructiveHint=false), and the description adds genuinely useful context on top: per-image billing with no charge on failure, a built-in submit→wait→result loop with a 120s default and 10–300s tunable window, and a signed resultUrl valid for only one hour. However, it does not cover how concurrent calls behave, whether an abandoned taskNo accrues cost, or quota/rate constraints, so it adds value without fully rounding out the behavior.

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?

Purpose, billing, and mode selection are front-loaded, and every sentence contributes operational detail. The dense semicolon-chained middle section with stacked parentheticals makes it slightly harder to scan than an ideally structured description.

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 tool with an output schema, a 120s blocking wait, and a timeout escape hatch, everything an agent needs to call it correctly and handle the failure path is present. Return values (resultUrl, taskNo) are explained anyway, and the handoff to get_image_task closes the loop.

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 description coverage is 0%, so the description carries the full burden and does so for every one of the five parameters: prompt semantics per mode, init_image_url's public-URL requirement plus png/jpg/jpeg and ≤10MB constraints, wait_seconds' 10–300 range and default, model's auto-selection defaults plus the upgrade option, and seed's non-negative integer reproducibility guarantee.

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?

Opens with a concrete verb + resource (AI image generation, 1024×1024 PNG) and immediately splits the two modes the tool supports: prompt-only text-to-image versus prompt + init_image_url image-to-image editing. An agent can distinguish this from siblings like get_image_task or list_image_models without opening any schema.

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?

Explicitly names when to fall through to alternatives: use list_image_models to check online models and live pricing before choosing a non-default model, and use get_image_task to continue polling after a timeout. It also states the default model selection logic per mode, so the agent knows when it must intervene and when it can omit the parameter.

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