Skip to main content
Glama
zK0G0w

gpt-image-mcp

by zK0G0w

文生图

generate_image

Generates images from text prompts via GPT Image API, saves them locally, and returns the absolute path and file URI. Use it when you need an image file from a description.

Instructions

根据提示词调用 GPT Image 生成一张图片,保存到本机并返回绝对路径和文件 URI。调用会产生 API 费用。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNo输出尺寸:auto 或 WIDTHxHEIGHT(如 1024x1024、1536x1024、3840x2160)。宽高需为 16 的倍数,比例不超过 3:1。auto
formatNo保存的图片格式。png
promptYes图片内容、风格、构图等要求。
qualityNo生成质量,越高通常越慢且费用越高。auto
backgroundNo背景模式;transparent 需配合 png 或 webp 格式。auto
moderationNo内容安全审核级别。auto
output_compressionNo输出压缩率(0-100),仅 jpeg 和 webp 格式生效。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes
imagesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

The description adds concrete behavioral details beyond the annotations: it saves the image to local storage, returns an absolute path and file URI, and exposes that API costs are incurred. Annotations already indicate non-read-only and side-effecting behavior; the description enriches that with practical cost and persistence facts.

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?

A single sentence is front-loaded with the main action ('generate an image'), followed immediately by the return/side-effect behavior and the cost warning. It has no filler or duplication of schema information, and every character earns its place.

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 7-parameter tool with 100% schema coverage and a defined output schema, the description adds precisely the context that is not in structured data: persistence to local disk, the returned path/URI shape, and API fees. All the information an agent needs to call the tool correctly is covered by the description, schema, and annotations together.

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 description coverage is 100%, so all 7 parameters already carry detailed semantic descriptions and enums. The description only repeats that the prompt drives generation, adding no new parameter meaning. The baseline of 3 is therefore correct.

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?

The description clearly specifies the action 'generate an image from GPT Image', the resource, and the deliverable: a local file with absolute path and file URI. It distinguishes itself from 'edit_image' (generating a new image vs modifying an existing one) and from 'check_endpoint', which is unrelated.

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?

The description implies usage by contextually framing a text-to-image generation task. It does not explicitly state when to prefer this over edit_image or check_endpoint, and it provides no exclusion criteria or when-not-to-use guidance, leaving that inference to the agent.

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

Install Server

Other Tools