labnana-mcp
Labnana MCP server lets MCP clients generate and edit images through Labnana while managing credits, subscriptions, and generation tasks.
Generate images from text prompts or reference images for image-to-image/editing workflows.
Use Gemini, GPT-Image-2, GPT-Image-2.5, Wan2.7, and Seedream models.
Run generation synchronously or asynchronously for large/4K or batch jobs.
Estimate credit cost before generating an image.
Check subscription status, credit balances, free usage, and reset timing.
List generation task history and retrieve task details/public image URLs.
Wait/poll for asynchronous generation tasks to complete.
Save original images and return bounded MCP previews plus structured metadata.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@labnana-mcpGenerate an image of a cat astronaut floating in space."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
labnana-mcp
An MCP server for the Labnana OpenAPI. It enables Claude, Claude Code, and other MCP clients to generate and edit images with Labnana.
Current OpenAPI models (product names mapped to the model parameter):
Product name |
| Provider | Resolutions | Best for |
Nano Banana Pro |
| 1K / 2K / 4K | In-image text, character consistency, high-fidelity output | |
Nano Banana 2 |
| 1K / 2K / 4K | Fast iteration and extreme aspect ratios | |
GPT-Image-2 |
| OpenAI | 1K / 2K / 4K | Spec-driven generation, layout control, illustration |
GPT-Image-2.5 Flare |
| OpenAI | 1K / 2K / 4K | Faster generation |
GPT-Image-2.5 Sunburst |
| OpenAI | 1K / 2K / 4K | Detail-dense images |
Wan2.7 Image Pro |
| Alibaba | 1K / 2K / 4K¹ | Photoreal and poster-style images |
Wan2.7 Image |
| Alibaba | 1K / 2K | Lower-cost everyday generation |
Seedream 5.0 Pro |
| ByteDance | 1K / 2K | Coordinate-driven region editing and Chinese instructions |
¹ wan2.7-image-pro supports 4K only for text-to-image; generations with reference images are limited to 2K. The OpenAPI reference lists GPT-Image-2.5 Flare and Sunburst; the model directory lists 1K / 2K / 4K and 10 aspect ratios, while the integration guide has not yet added the variants to its model list. Both variants support up to four reference images and cost the same. Check estimate_credits for the current price before generation.
GitHub · npm · MCP Registry · Glama · 中文文档
Installation
Requires Node.js 20.9 or later.
Claude Code
Create an API key in the Labnana API Keys console.
Make
LABNANA_API_KEYavailable in the environment used by Claude Code.Add the server:
claude mcp add labnana -- npx -y @exoticknight/labnana-mcpThe package can also be started directly with:
npx -y @exoticknight/labnana-mcpDeepSeek Harness (DSH)
Add the server through DSH's official MCP client plugin. Pin 2.2.0 when you want the version shown by initialize to identify this MCP Apps-capable build:
- id: mcp-labnana
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: labnana
transport: stdio
command: npx
args: ['-y', '@exoticknight/labnana-mcp@2.2.0']
env:
LABNANA_API_KEY: !!js process.env.LABNANA_API_KEYDSH's MCP bridge can project supported ImageContent into the calling vision model. Version 2.1 also publishes a standard MCP Apps single-file View for generate_image and get_generation_task. An MCP Apps-capable DSH Web host renders the preview inline; a stock generic DSH tool card may still show the JSON fallback even though the model received the image. This is a client presentation limitation, not a lost generation result.
For a local source checkout, use the same row with command: node, an absolute args path to dist/index.js, and cwd set to this repository. Current stock DSH builds bridge MCP tools but do not consume MCP resources in the generic tool card. Without an MCP Apps host, model vision still works and the card falls back to JSON.
Cursor and VS Code
One-click install (replace the placeholder API key after installing):
Claude Desktop and other MCP clients
Use an equivalent mcpServers configuration:
{
"mcpServers": {
"labnana": {
"command": "npx",
"args": ["-y", "@exoticknight/labnana-mcp"],
"env": {
"LABNANA_API_KEY": "lh_xxxxxxxxx"
}
}
}
}Local source checkout
npm install
npm run buildThen configure the server with the generated dist/index.js:
claude mcp add labnana -- node <path-to-repo>/dist/index.jsOn Windows, use an absolute path such as:
claude mcp add labnana -- node C:/path/to/labnana-mcp/dist/index.jsRelated MCP server: Nano Banana MCP
Configuration
The server reads the following environment variable:
Variable | Required | Description |
| Yes | Labnana API key. |
| No | Default directory for saved images. Falls back to |
The command-line options below are also supported:
Option | Description |
| Provide the API key for a local process. |
| Override the default API endpoint, |
| Default directory for saved images. |
Environment variables are recommended because command-line arguments may be visible in the local process list.
Tools
Tool | Description |
| One-stop text-to-image / image-to-image / editing. Saves the original and returns a bounded MCP image preview, structured metadata, and JSON fallback by default; 4K requests poll internally. |
| Estimate the credits required for a generation without generating an image. |
| Get subscription status, credit balances, and free usage information. |
| List generation task history with pagination and optional status filtering. |
| Get task details and public image URLs (useful after a |
Usage
Generate an image
{
"name": "generate_image",
"arguments": {
"model": "gemini-3-pro-image",
"prompt": "Change the background of the image to the grasslands of Inner Mongolia",
"referenceImages": [
{
"fileData": {
"fileUri": "https://cdn.labnana.com/xxx.png",
"mimeType": "image/png"
}
}
],
"imageConfig": {
"imageSize": "2K",
"aspectRatio": "16:9"
}
}
}The default is outputMode=hybrid: the full original is saved to disk while a bounded MCP image preview, structuredContent, and equivalent JSON text are returned together. This provides progressive compatibility across Codex, Claude Code, Claude Desktop, and other MCP clients. Use saveDir to choose the target directory.
All 1K, 2K, 4K, and get_generation_task results use the same envelope:
{
"schemaVersion": 1,
"status": "succeeded",
"taskId": "task-123",
"images": [
{
"index": 0,
"mimeType": "image/png",
"width": 4096,
"height": 4096,
"byteLength": 18442231,
"sha256": "...",
"url": "https://.../original.png",
"filePath": "C:\\...\\labnana.png",
"preview": { "included": true, "mimeType": "image/jpeg", "width": 1600, "height": 1600 }
}
]
}Image base64 appears only in standard MCP ImageContent, never duplicated into text or structured metadata. Full 4K originals are not inlined; previews have a maximum 1600-pixel edge and target a 2 MiB byte ceiling, while filePath/url locate the original.
Use referenceImages for image-to-image generation and editing. fileData.fileUri supports gs:// and https://; small images can be passed as base64 through inlineData.data.
4K requests automatically run as asynchronous tasks: the server creates the task, polls with rate-limit backoff, downloads and saves originals, and creates previews. If the wait exceeds timeoutSeconds (default 300), the result has status=pending and a taskId; this is not treated as generation failure. Fetch the final preview and original URL later with get_generation_task.
Credit estimation
{
"name": "estimate_credits",
"arguments": {
"prompt": "A Shiba Inu running through a snowy landscape",
"imageConfig": {
"imageSize": "4K"
}
}
}Parameters
model(default:gemini-3-pro-image):gemini-3-pro-image,gemini-3.1-flash-image,gpt-image-2,gpt-image-2.5-flare,gpt-image-2.5-sunburst,wan2.7-image-pro,wan2.7-image, orseedream-5-0-pro. The provider is derived from the model automatically. Useestimate_creditsto confirm a GPT-Image-2.5 size and cost before generation.imageConfig.imageSize:1K,2K, or4K.wan2.7-imageandseedream-5-0-prodo not support 4K;wan2.7-image-proalso disallows 4K when reference images are present.imageConfig.aspectRatio:1:1,2:3,3:2,3:4,4:3,4:5,5:4,9:16,16:9,21:9,1:4,4:1,1:8, or8:1. GPT-Image-2 may omit this field and let the service choose; GPT-Image-2.5 supports the ten ratios from1:1through21:9; Wan2.7 supports only1:1,16:9,9:16,4:3, and3:4.referenceImages: OpenAPI allows up to 14 for Gemini, 4 for GPT-Image-2 / GPT-Image-2.5, 9 for Wan2.7, and 10 for Seedream. These are API limits, not the separate upload limits of the web generator.Seedream precise editing: put the source image in
referenceImagesand describe the target region and change inpromptusing absolute coordinates from the top-left origin. OpenAPI has no separatemaskorregionparameter.outputMode(generate_imageonly):hybrid(default, save originals and inline bounded previews),file(save originals and return metadata only), orinline(do not save tosaveDir; return a bounded preview, and persist the original to the default recovery directory only when the upstream response has no original URL).saveDir/timeoutSeconds(generate_imageonly): target directory forhybrid/filemode, and the maximum wait for async (4K) generations.
Credit summary
Model | 1K | 2K | 4K |
| 15 | 15 | 30 |
| 10 | 10 | 20 |
| 4 | 6 | 10 |
| 6 | 8 | 12 (text-to-image only) |
| 4 | 6 | Not supported |
| 6 | 15 | Not supported |
GPT-Image-2.5 Flare and Sunburst have the same price, but the integration guide does not list their size-specific credit values. Call estimate_credits with the intended model and imageConfig for the current cost and supported configuration.
Free usage
get_subscription returns freeUsages. This quota is shared with the Labnana website and ListenHub app. Nano Banana Pro free usage applies to 1K / 2K only; 4K is always charged in credits. When using that free quota, a never-paid account may receive a retryable busy error on the low-priority lane; retries do not consume the free quota or credits.
Errors
API errors are returned as { code, message } and exposed as MCP results with isError: true.
Code | Meaning | Recommendation |
21007 | Invalid API key | Check |
26004 | Insufficient credits | Check the subscription or upgrade the plan. |
29003 | Invalid parameters | Check required fields and model-specific limits. |
29998 | Too many requests | Retry with a 20–30 second backoff. |
Development
npm install
npm run typecheck
npm testTo inspect the real single-file MCP App without calling Labnana or spending credits, run npm run test:ui and open http://127.0.0.1:4173/test/mcp-app-host.html. The local host sends a generated 640×360 PNG fixture through the official AppBridge so the image, status, and metadata can be checked visually.
For optional live API checks, put LABNANA_API_KEY in the repository-root .env and run npm run test:real. It checks the subscription and estimates both GPT-Image-2.5 variants without generating images or spending credits; the tests skip when the key is not configured.
To verify actual image generation, first run npm run build, then run node test/e2e-generate.mjs. This spends credits. Set LABNANA_TEST_MODEL, LABNANA_TEST_IMAGE_SIZE, LABNANA_TEST_ASPECT_RATIO, LABNANA_TEST_PROMPT, and LABNANA_OUTPUT_DIR to choose the model, output, and save location. Generated originals go under labnana-images/ by default and are ignored by Git.
Links
Technical support: support@marswave.ai
License
Community
Available Tools
5 toolsestimate_credits预估图片生成所需积分A
根据模型、尺寸、宽高比等参数预估生成图片所需的积分。同步返回,不实际生成图片、不扣除积分。适合在批量生成或使用 4K 前先确认成本。
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | 图片生成模型,默认 gemini-3-pro-image。选择建议:gemini-3-pro-image 综合最强、指令遵循和文字渲染好(15 积分/1K-2K);gemini-3.1-flash-image 快速便宜的日常生成(10 积分);gpt-image-2 性价比最高(4 积分起);gpt-image-2.5-flare 偏快速出图,gpt-image-2.5-sunburst 偏细节密集;两者同价,具体尺寸和积分先用 estimate_credits 查询;wan2.7-image-pro / wan2.7-image 写实与海报风格;seedream-5-0-pro 擅长精准局部编辑(配合参考图使用) | |
| prompt | Yes | ||
| imageConfig | No | ||
| referenceImages | No | 图生图 / 改图的参考图片,支持 fileUri(gs:// 或 https://)或 base64 inlineData |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
没有注解,因此描述承担全部说明责任;它很好地说明了关键的无副作用特性(同步返回、不实际生成、不扣费)。但它没有提及什么都不返回、是否校验参数,或者 estimate 与 generate 的校验是否不同。
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
两句话,句句有分量,先说明“做什么”和“不做什么”。大小合适。“等参数”的措辞略含糊,但影响不大。
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
对于一个包含嵌套对象的 4 参数估算工具,安全特性和使用时机都已覆盖,但描述从未说明返回值的形态(例如返回单个积分总数,还是按模型/尺寸拆分的明细),也没有输出 schema 来弥补这一点。
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema 覆盖率为 50%;描述将参数概括为“模型、尺寸、宽高比”,但模型枚举的 schema 已经通过按模型给出积分成本和选型建议承担了大部分工作。描述从未说明为什么一个不生成内容的工具必须填写 prompt——这是 Agent 会注意到的实际缺口。
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
特定动词(预估)+ 特定资源(生成图片所需的积分),并明确排除了实际生成(“不实际生成图片、不扣除积分”),从而与 generate_image 区分开来。Agent 无需查看 schema 即可知道此工具返回什么。
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
“适合在批量生成或使用 4K 前先确认成本”给出了具体的使用场景,模型参数的 schema 也指引 Agent“先用 estimate_credits 查询”。它没有明确点出生成对应的操作(generate_image),但排除性陈述传达了这层意思。
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_image生成图片A
文生图 / 图生图 / 改图的一站式工具:默认保存完整原图,同时返回有大小上限的 MCP 图片预览、结构化元数据和 JSON 文本兜底。大图(4K)会自动走异步任务并在内部等待完成,无需手动轮询。支持 Gemini 系列、GPT-Image-2 / 2.5、Wan2.7、Seedream 5.0 Pro,模型由 model 参数选择,无需指定提供商。
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | 图片生成模型,默认 gemini-3-pro-image。选择建议:gemini-3-pro-image 综合最强、指令遵循和文字渲染好(15 积分/1K-2K);gemini-3.1-flash-image 快速便宜的日常生成(10 积分);gpt-image-2 性价比最高(4 积分起);gpt-image-2.5-flare 偏快速出图,gpt-image-2.5-sunburst 偏细节密集;两者同价,具体尺寸和积分先用 estimate_credits 查询;wan2.7-image-pro / wan2.7-image 写实与海报风格;seedream-5-0-pro 擅长精准局部编辑(配合参考图使用) | |
| prompt | Yes | ||
| saveDir | No | hybrid/file 模式下的保存目录,默认取 LABNANA_OUTPUT_DIR 或当前目录下的 labnana-images/ | |
| outputMode | No | 结果返回方式:hybrid(默认)保存原图并内联有界预览,跨客户端兼容性最好;file 只保存原图并返回定位信息;inline 不保存到 saveDir,有 URL 时返回有界预览,无 URL 时把原图保存到默认恢复目录并返回有界预览 | |
| imageConfig | No | ||
| timeoutSeconds | No | 生成总超时秒数,默认 300(仅 4K 等异步路径需要等待时生效) | |
| referenceImages | No | 图生图 / 改图的参考图片,支持 fileUri(gs:// 或 https://)或 base64 inlineData |
Output Schema
| Name | Required | Description |
|---|---|---|
| error | No | |
| images | Yes | |
| status | Yes | |
| taskId | No | |
| message | No | |
| warnings | No | |
| retryable | No | |
| generation | No | |
| schemaVersion | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description carries the full burden and does substantial work: it discloses the default disk side effect (saving full-resolution originals), the bounded preview returned to MCP, structured metadata plus a JSON text fallback, automatic async handling for 4K, and that providers never need to be specified. It does not mention auth requirements, credit costs, or whether files are overwritten on repeat calls.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two dense sentences, front-loaded with the tool's scope before moving to output behavior and model selection; nothing is redundant. Density works against it slightly — file handling, preview format, async behavior, and model selection are all packed without visual separation, making it easy to skim past the async-wait detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given seven parameters, nested reference-image objects, enums, and an output schema, the description covers the pieces an agent most needs: what gets saved where, what comes back, and that long-running 4K calls resolve internally. The main omission is any mention of credit consumption or a pointer to estimate_credits, which matters for a paid generation tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 71% and the schema itself is unusually rich — per-model cost and use-case guidance, outputMode semantics, saveDir defaults, and referenceImages formats are all documented inline. The description adds only that models are chosen via the model parameter and no provider field is needed, which is marginal value over the schema and leaves prompt, imageConfig, and timeoutSeconds untouched at the description level.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a precise scope — text-to-image, image-to-image, and image editing in one tool — so the agent knows exactly which operation family this covers. It implicitly differentiates from the task-polling siblings by stating 'no manual polling needed', but never names get_generation_task or list_generation_tasks, so sibling routing is only inferable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage context is implied through the three modes (text-to-image / image-to-image / editing) and the note that 4K runs async internally without polling, which steers the agent away from a poll loop. However, there is no explicit statement of when NOT to call this tool, no pointer to estimate_credits before spending credits, and no reference to the task-listing siblings as an alternative view.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_generation_task获取图片生成任务详情A
查询图片生成任务状态与结果。任务成功时返回统一结构化 envelope、有界 MCP 图片预览和原图 URL。generate_image 等待超时后可用返回的 taskId 在这里取回结果。
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| error | No | |
| images | Yes | |
| status | Yes | |
| taskId | No | |
| message | No | |
| warnings | No | |
| retryable | No | |
| generation | No | |
| schemaVersion | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are supplied, so the description carries the burden — and it does disclose the return contract: a unified structured envelope, a size-bounded MCP image preview, and the original image URL. That 'bounded preview' detail is genuinely non-obvious behavior. It does not address failure paths (failed task, unknown taskId) or auth/rate limits, so it falls 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, front-loaded with purpose, then return shape, then the recovery workflow. Nothing is repeated from the schema or annotations and no sentence is filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need less prose, yet the description still sketches the envelope and preview/URL split. Combined with the generate_image timeout flow, an agent has enough to call it correctly; only the behavior for a failed or expired task is unaddressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the single required taskId is only explained by the description — and it does explain provenance: it is the taskId returned by generate_image after a wait timeout. No format or length constraints are restated, but the origin of the value is the piece the schema cannot convey.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Names a specific verb and resource in the first clause (query image generation task status and result), and the singular 'task' framing plus the explicit hand-off from generate_image separates it from list_generation_tasks. An agent can tell what this retrieves without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
States a concrete trigger and alternative: after generate_image times out, call this with the returned taskId to get the result. That is a clear when-to-use. It stops short of an exclusion (e.g. do not use this to enumerate tasks — use list_generation_tasks instead), so it is not a full when/when-not statement.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_subscription获取订阅信息与积分余额B
获取当前 API Key 账户的订阅状态、可用积分(月度/永久/限时)、免费额度(freeUsages)与重置时间。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist to lighten the description's burden, but the description does disclose which fields come back: monthly, permanent, and limited-time credits, freeUsages, and reset time. It does not mention side effects (a get implies none), but it also fails to mention rate limits, caching, or whether the values are live. That is acceptable disclosure for a read-only getter, but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one dense, front-loaded sentence with no filler. The parenthetical breakdown of credit types is compact and informative rather than redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Because there is no output schema, the description must convey the return shape; it lists the key fields, including freeUsages and reset time, which are not obvious from the name alone. For a zero-parameter getter, this is nearly complete; only output formatting and freshness are unstated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema defines zero parameters, so the baseline score is 4; there is nothing for the description to disambiguate. The description correctly implies the tool takes no arguments and acts on the caller's account.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb (获取) and resource (subscription info for the current API Key account), and it enumerates the returned data: subscription status, credits split by type, freeUsages, and reset time. It does not explicitly distinguish itself from siblings such as estimate_credits, which also deals with credits, so it stops short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states what the tool returns but never when to call it instead of alternatives; for example, it does not clarify whether this is the way to check the balance before generate_image or how it differs from estimate_credits. The API-Key scoping is mentioned, but no exclusions or naming of alternatives are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_generation_tasks获取图片生成任务列表A
按创建时间倒序返回当前 API Key 用户的图片生成任务历史,可按状态过滤。
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 页码,默认 1 | |
| status | No | 按状态过滤:pending / generating / success / fail | |
| pageSize | No | 每页数量,默认 20 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose two genuine behavioral traits beyond the schema: results are scoped to the current API Key's own tasks, and output is sorted by creation time descending. It omits what each returned task contains and whether pagination metadata is included, which keeps it from 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence that states scope, ordering and filtering in order of importance with no redundant restatement of the name. Nothing can be trimmed without losing information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 3-parameter read-only list tool with a fully documented schema this covers the essentials (who, order, filter), but with no output schema present the description gives no hint about the shape of returned task records or pagination fields, leaving an agent to discover the response empirically.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% — page, pageSize and the status enum are all documented in the schema, so baseline is 3. The description only echoes the status-filter concept and adds no format or default detail beyond it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb-resource pair (返回…图片生成任务历史) and adds scope (当前 API Key 用户) and ordering (按创建时间倒序), so an agent can tell this is a list/history operation distinct from the sibling get_generation_task. It stops short of explicitly naming that sibling as the single-task alternative.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied rather than stated: '任务历史' plus '可按状态过滤' suggests browsing past tasks, and the sibling name get_generation_task implies the single-record counterpart, but the description never says when to prefer one over the other or what prerequisites exist.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v2.2.0- Changed
estimate_credits7 fields changed- added
Input schema / $schemaAdded value: +"http://json-schema.org/draft-07/schema#" - added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / imageConfigAdded value: +{ + "additionalProperties": false, + "properties": { + "aspectRatio": { + "enum": [ + "1:1", + "2:3", + "3:2", + "3:4", + "4:3", + "4:5", + "5:4", + "9:16", + "16:9", + "21:9", + "1:4", + "4:1", + "1:8", + "8:1" + ], + "type": "string" + }, + "imageSize": { + "enum": [ + "1K", + "2K", + "4K" + ], + "type": "string" + }, + "quality": { + "type": "string" + } + }, + "type": "object" +} - added
Input schema / properties / modelAdded value: +{ + "description": "图片生成模型,默认 gemini-3-pro-image。选择建议:gemini-3-pro-image 综合最强、指令遵循和文字渲染好(15 积分/1K-2K);gemini-3.1-flash-image 快速便宜的日常生成(10 积分);gpt-image-2 性价比最高(4 积分起);gpt-image-2.5-flare 偏快速出图,gpt-image-2.5-sunburst 偏细节密集;两者同价,具体尺寸和积分先用 estimate_credits 查询;wan2.7-image-pro / wan2.7-image 写实与海报风格;seedream-5-0-pro 擅长精准局部编辑(配合参考图使用)", + "enum": [ + "gemini-3-pro-image", + "gemini-3.1-flash-image", + "gpt-image-2", + "gpt-image-2.5-flare", + "gpt-image-2.5-sunburst", + "wan2.7-image-pro", + "wan2.7-image", + "seedream-5-0-pro" + ], + "type": "string" +} - added
Input schema / properties / promptAdded value: +{ + "minLength": 1, + "type": "string" +} - added
Input schema / properties / referenceImagesAdded value: +{ + "description": "图生图 / 改图的参考图片,支持 fileUri(gs:// 或 https://)或 base64 inlineData", + "items": { + "additionalProperties": false, + "properties": { + "fileData": { + "additionalProperties": false, + "properties": { + "fileUri": { + "minLength": 1, + "type": "string" + }, + "mimeType": { + "type": "string" + } + }, + "required": [ + "fileUri" + ], + "type": "object" + }, + "inlineData": { + "additionalProperties": false, + "properties": { + "data": { + "minLength": 1, + "type": "string" + }, + "mimeType": { + "type": "string" + } + }, + "required": [ + "data" + ], + "type": "object" + } + }, + "type": "object" + }, + "maxItems": 14, + "type": "array" +} - added
Input schema / requiredAdded value: +[ + "prompt" +]
- Changed
generate_image11 fields changed- added
Input schema / $schemaAdded value: +"http://json-schema.org/draft-07/schema#" - added
Input schema / additionalPropertiesAdded value: +false - added
Input schema / properties / imageConfigAdded value: +{ + "additionalProperties": false, + "properties": { + "aspectRatio": { + "enum": [ + "1:1", + "2:3", + "3:2", + "3:4", + "4:3", + "4:5", + "5:4", + "9:16", + "16:9", + "21:9", + "1:4", + "4:1", + "1:8", + "8:1" + ], + "type": "string" + }, + "imageSize": { + "enum": [ + "1K", + "2K", + "4K" + ], + "type": "string" + }, + "quality": { + "type": "string" + } + }, + "type": "object" +} - added
Input schema / properties / modelAdded value: +{ + "description": "图片生成模型,默认 gemini-3-pro-image。选择建议:gemini-3-pro-image 综合最强、指令遵循和文字渲染好(15 积分/1K-2K);gemini-3.1-flash-image 快速便宜的日常生成(10 积分);gpt-image-2 性价比最高(4 积分起);gpt-image-2.5-flare 偏快速出图,gpt-image-2.5-sunburst 偏细节密集;两者同价,具体尺寸和积分先用 estimate_credits 查询;wan2.7-image-pro / wan2.7-image 写实与海报风格;seedream-5-0-pro 擅长精准局部编辑(配合参考图使用)", + "enum": [ + "gemini-3-pro-image", + "gemini-3.1-flash-image", + "gpt-image-2", + "gpt-image-2.5-flare", + "gpt-image-2.5-sunburst", + "wan2.7-image-pro", + "wan2.7-image", + "seedream-5-0-pro" + ], + "type": "string" +} - added
Input schema / properties / outputModeAdded value: +{ + "description": "结果返回方式:hybrid(默认)保存原图并内联有界预览,跨客户端兼容性最好;file 只保存原图并返回定位信息;inline 不保存到 saveDir,有 URL 时返回有界预览,无 URL 时把原图保存到默认恢复目录并返回有界预览", + "enum": [ + "hybrid", + "file", + "inline" + ], + "type": "string" +} - added
Input schema / properties / promptAdded value: +{ + "minLength": 1, + "type": "string" +} - added
Input schema / properties / referenceImagesAdded value: +{ + "description": "图生图 / 改图的参考图片,支持 fileUri(gs:// 或 https://)或 base64 inlineData", + "items": { + "additionalProperties": false, + "properties": { + "fileData": { + "additionalProperties": false, + "properties": { + "fileUri": { + "minLength": 1, + "type": "string" + }, + "mimeType": { + "type": "string" + } + }, + "required": [ + "fileUri" + ], + "type": "object" + }, + "inlineData": { + "additionalProperties": false, + "properties": { + "data": { + "minLength": 1, + "type": "string" + }, + "mimeType": { + "type": "string" + } + }, + "required": [ + "data" + ], + "type": "object" + } + }, + "type": "object" + }, + "maxItems": 14, + "type": "array" +} - added
Input schema / properties / saveDirAdded value: +{ + "description": "hybrid/file 模式下的保存目录,默认取 LABNANA_OUTPUT_DIR 或当前目录下的 labnana-images/", + "minLength": 1, + "type": "string" +} - added
Input schema / properties / timeoutSecondsAdded value: +{ + "description": "生成总超时秒数,默认 300(仅 4K 等异步路径需要等待时生效)", + "maximum": 3600, + "minimum": 1, + "type": "integer" +} - added
Input schema / requiredAdded value: +[ + "prompt" +] - changed
Output schema / (root)Previous value: -nullNew value: +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "error": { + "additionalProperties": false, + "properties": { + "details": {}, + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + }, + "generation": { + "additionalProperties": false, + "properties": { + "finishReason": { + "type": "string" + }, + "modelVersion": { + "type": "string" + }, + "responseId": { + "type": "string" + } + }, + "type": "object" + }, + "images": { + "items": { + "additionalProperties": false, + "properties": { + "byteLength": { + "minimum": 0, + "type": "integer" + }, + "filePath": { + "minLength": 1, + "type": "string" + }, + "height": { + "exclusiveMinimum": 0, + "type": "integer" + }, + "index": { + "minimum": 0, + "type": "integer" + }, + "mimeType": { + "type": "string" + }, + "preview": { + "additionalProperties": false, + "properties": { + "byteLength": { + "minimum": 0, + "type": "integer" + }, + "height": { + "exclusiveMinimum": 0, + "type": "integer" + }, + "included": { + "type": "boolean" + }, + "mimeType": { + "type": "string" + }, + "width": { + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "included" + ], + "type": "object" + }, + "sha256": { + "pattern": "^[a-f0-9]{64}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + }, + "width": { + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "index", + "mimeType", + "preview" + ], + "type": "object" + }, + "type": "array" + }, + "message": { + "type": "string" + }, + "retryable": { + "type": "boolean" + }, + "schemaVersion": { + "const": 1, + "type": "number" + }, + "status": { + "enum": [ + "succeeded", + "pending", + "failed" + ], + "type": "string" + }, + "taskId": { + "type": "string" + }, + "warnings": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "schemaVersion", + "status", + "images" + ], + "type": "object" +}
- Removed
generate_image_async - Changed
get_generation_task1 field changed- changed
Output schema / (root)Previous value: -nullNew value: +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "error": { + "additionalProperties": false, + "properties": { + "details": {}, + "message": { + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + }, + "generation": { + "additionalProperties": false, + "properties": { + "finishReason": { + "type": "string" + }, + "modelVersion": { + "type": "string" + }, + "responseId": { + "type": "string" + } + }, + "type": "object" + }, + "images": { + "items": { + "additionalProperties": false, + "properties": { + "byteLength": { + "minimum": 0, + "type": "integer" + }, + "filePath": { + "minLength": 1, + "type": "string" + }, + "height": { + "exclusiveMinimum": 0, + "type": "integer" + }, + "index": { + "minimum": 0, + "type": "integer" + }, + "mimeType": { + "type": "string" + }, + "preview": { + "additionalProperties": false, + "properties": { + "byteLength": { + "minimum": 0, + "type": "integer" + }, + "height": { + "exclusiveMinimum": 0, + "type": "integer" + }, + "included": { + "type": "boolean" + }, + "mimeType": { + "type": "string" + }, + "width": { + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "included" + ], + "type": "object" + }, + "sha256": { + "pattern": "^[a-f0-9]{64}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + }, + "width": { + "exclusiveMinimum": 0, + "type": "integer" + } + }, + "required": [ + "index", + "mimeType", + "preview" + ], + "type": "object" + }, + "type": "array" + }, + "message": { + "type": "string" + }, + "retryable": { + "type": "boolean" + }, + "schemaVersion": { + "const": 1, + "type": "number" + }, + "status": { + "enum": [ + "succeeded", + "pending", + "failed" + ], + "type": "string" + }, + "taskId": { + "type": "string" + }, + "warnings": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "schemaVersion", + "status", + "images" + ], + "type": "object" +}
- Removed
wait_for_generation_task
7 tool updates
v1.0.0- First observed
estimate_credits - First observed
generate_image - First observed
generate_image_async - First observed
get_generation_task - First observed
get_subscription - First observed
list_generation_tasks - First observed
wait_for_generation_task
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: account subscription, credit estimation, image generation, task listing, and single-task retrieval. The only potentially related pair, list_generation_tasks and get_generation_task, is cleanly separated by list vs. single-task-by-ID semantics.
All tool names follow a consistent snake_case verb_noun pattern: get_subscription, estimate_credits, generate_image, list_generation_tasks, get_generation_task. The repeated get_ prefix is used predictably for retrieval operations.
Five tools is well-scoped for an image-generation API surface. Each tool corresponds to a meaningful operation without obvious redundancy or filler.
The surface covers account status, cost estimation, generation, task listing, and task retrieval, which supports the main workflows. Minor gaps such as task cancellation or model listing are not covered, but agents can work around these.
Maintenance
Related MCP Connectors
MCP server for Midjourney AI image generation and editing
MCP server for Qwen Image 3 AI image generation
MCP server for Flux AI image generation
MCP server for ByteDance Seedream AI image generation
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides image generation using Google's Nano Banana Gemini models, with additional tools for background removal, upscaling, and format conversion via deterministic post-processing.1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Google's Nano Banana image generation models (Gemini). Generate and edit images via natural language.27 npm1MIT
- AlicenseAqualityDmaintenanceMCP server for AI image generation and editing using Google Gemini image models.7845 npmMIT
- AlicenseAqualityCmaintenanceMCP server for generating and editing images using Google Gemini API. Supports text-to-image generation, image editing, and image description.321 npmMIT