Skip to main content
Glama

OpenAI 生图

aidada_image_generate

Generate images, SVGs, or GIFs from text prompts with a specified model; returns a job ID so you can poll for results when processing is still running.

Instructions

使用指定 model 生成图片、SVG 或 GIF。complexity/quality/size/background 等参数原样发往 OpenAI;可用参数取决于模型。返回 job_id;running 时调用 aidada_image_result。

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

Input Schema

NameRequiredDescriptionDefault
nNo
svgNoSVG 作者模型与独立 reasoning.effort;需要上游账号开通模型选择。
sizeNoauto 或 WIDTHxHEIGHT;自定义边长为 16 的倍数,最终预算由上游校验。
userNo已弃用的兼容字段;优先 safety_identifier。
modelNo默认 gpt-image-2.6-sunburst;可指定快照或其他有权限的图片模型。
styleNo旧 DALL·E 3 兼容字段;GPT Image 的风格写入 prompt。
promptYes完整图片要求;原样发送,不由 MCP 改写。
streamNo使用 OpenAI SSE,保存中间图和最终图。
qualityNo按所选模型支持范围使用;standard/hd 仅保留旧 API 兼容。
wait_msNoMCP 等待时间;超时返回 job_id,任务继续。用 aidada_image_result 查询,禁止重复生成同一请求。
backgroundNo
complexityNo绘制前规划强度,独立于 quality;省略时 Sunburst 2.6 默认 high。
extra_bodyNo新增官方字段的透传入口;不能覆盖已列出的字段,不能夹带 HTTP 请求头。
moderationNo
frame_countNoGIF 帧数;官方指南与 SDK 上限不同,16 以上须由账户实际 API 验证。
output_formatNo
partial_imagesNo
include_previewNo返回可内联显示的栅格图片;大文件仍以资源链接返回。
prompt_rewriterNo高级原样透传;公开文档未定义稳定类型。不支持 markup、SVG、GIF。
response_formatNo旧 API 兼容;GPT Image 自动返回 base64,必须省略。
client_request_idNo可选客户端请求标识:同进程重复调用返回原任务;不是上游幂等或跨重启保证。
frame_duration_msNoGIF 每帧时长;API 取整到 10ms,具体范围以模型为准。
safety_identifierNo
output_compressionNo

Output Schema

NameRequiredDescriptionDefault
jobYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, open-world, non-idempotent, non-destructive operation, so the safety profile is covered. The description adds genuinely useful behavior: an async job is created returning job_id and progress is polled with aidada_image_result. It does not mention cancellation, cost, or what a failed job returns.

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?

Three short clauses, front-loaded with purpose, then passthrough semantics, then the return/polling contract. No filler, though the middle clause packs several concepts into one sentence.

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?

An output schema exists and the description correctly refrains from explaining return values, focusing instead on the job_id handoff. For a 24-parameter async generation tool, the remaining gap is mostly around failure/cancel paths rather than core invocation.

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?

With 24 parameters and only 71% schema description coverage, the description adds real value by saying complexity/quality/size/background are forwarded verbatim to OpenAI and that which parameters are valid depends on the model. It leaves the remaining undocumented parameters (background, moderation, partial_images, output_compression) unaddressed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb and resource set (生成图片、SVG 或 GIF) plus the controlling input (model). It clearly separates this from aidada_image_result by naming it as the follow-up, though it does not distinguish itself from aidada_image_edit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives one explicit routing rule: when the job is running, call aidada_image_result, and it implies the tool is the entry point for generation. It offers no guidance on when to use aidada_image_edit instead, nor prerequisites such as account model entitlements beyond 'available parameters depend on the model'.

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