Skip to main content
Glama
jau123

MeiGen AI Image Generation MCP

by jau123

generate_image

Destructive

Create AI-generated images from text prompts across MeiGen, ComfyUI, or OpenAI-compatible providers. Use reference images and adjustable quality, size, and aspect ratio for tailored results.

Instructions

Generate an image using AI. Supports MeiGen platform, local ComfyUI, or OpenAI-compatible APIs. Tip: get prompts from get_inspiration() or enhance_prompt(), and use gallery image URLs as referenceImages for style guidance. For Midjourney V8.1, an optional style reference can be passed by appending --sref <code> at the end of the prompt — only when the user provides a Midjourney style code (numeric or text). Do NOT pass URLs or local paths via --sref; for any image-based reference, use the referenceImages parameter instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoImage size for OpenAI-compatible providers: "1024x1024", "1536x1024", "auto". MeiGen/ComfyUI: use aspectRatio instead.
waitNoMeiGen only: false returns the accepted generation ID immediately; poll check_generation separately. Default true waits for completion. Submit-only requires requestId.
modelNoModel name. For OpenAI-compatible providers: any model ID your endpoint supports. For MeiGen: use model IDs from list_models (e.g. "gpt-image-2", "grok-image" = xAI Grok Imagine Quality, 1K/2K, supports image-to-image, "nanobanana-2", "seedream-4.5", "flux2-klein").
promptYesThe image generation prompt
modelIdNoAlias of model for portable workflow calls. If both are present they must match.
qualityNoImage quality. MeiGen gpt-image-2: "low" / "medium" / "high". OpenAI-compatible providers also accept "high".
downloadNoSave the completed result locally (default true). Set false for URL-only workflows. Ignored when wait=false. Other providers may return inline image content when local saving is disabled.
providerNoWhich provider to use. Auto-detected from configuration if not specified.
workflowNoComfyUI workflow name to use (from comfyui_workflow list). Uses default workflow if not specified.
requestIdNoPersistent UUID for this workflow step. Required when wait=false. Reuse with identical inputs after interruption, including after MCP restart; use a new UUID for a new generation. Omit only for a new interactive generation.
resolutionNoResolution tier. MeiGen: "1K" / "2K" / "3K" / "4K" — each model supports a subset (list_models reports resolutions when applicable). OpenAI: not used (use size instead).
aspectRatioNoAspect ratio for MeiGen provider. Use "auto" (recommended, default when omitted) to let MeiGen infer the best ratio from the prompt content. Explicit values: "1:1", "3:4", "4:3", "16:9", "9:16", "21:9", "2:3", "3:2", "4:5", "5:4", etc. (model-dependent). ComfyUI: use comfyui_workflow modify to adjust dimensions before generating.
modelVariantNoOptional model variant from live list_models, such as a supported GPT Image 2.5 variant. Forwarded unchanged to MeiGen.
negativePromptNoNegative prompt for OpenAI-compatible providers. ComfyUI: use comfyui_workflow modify to set negative prompt in the workflow before generating.
referenceImagesNoImage references for style/content guidance. Accepts direct public HTTPS URLs without credentials/fragments or accessible absolute local paths. Relative paths are rejected. Local PNG/JPEG/WebP/GIF references up to 32 MiB and 64 million pixels are fully decoded, stripped of metadata and prepared up to 4096px, preserving transparency. For ComfyUI: local files are passed directly to the workflow (requires LoadImage node). Sources: gallery URLs from search_gallery/get_inspiration, URLs from previous generate_image results, or local file paths.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlsYes
errorNo
statusYes
dedupedNo
modelIdNo
successYes
imageUrlNo
providerNo
videoUrlNo
mediaTypeNo
requestIdNo
savedPathNo
nextActionNo
creditsUsedNo
generationIdNo
creditsStatusNo
receiptWarningNo
downloadWarningNo
observationEndedNo
pollAfterSecondsNo
requestedMediaTypeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv2.0.1
    • addedInput schema / properties / download
      Added value: +{
      +  "default": true,
      +  "description": "Save the completed result locally (default true). Set false for URL-only workflows. Ignored when wait=false. Other providers may return inline image content when local saving is disabled.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / model / minLength
      Added value: +1
    • addedInput schema / properties / modelId
      Added value: +{
      +  "description": "Alias of model for portable workflow calls. If both are present they must match.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / modelVariant
      Added value: +{
      +  "description": "Optional model variant from live list_models, such as a supported GPT Image 2.5 variant. Forwarded unchanged to MeiGen.",
      +  "type": "string"
      +}
    • changedInput schema / properties / referenceImages / description
      Previous value: -"Image references for style/content guidance. Accepts both public URLs (http/https) and local file paths. Local files are automatically compressed and uploaded when needed. For ComfyUI: local files are passed directly to the workflow (requires LoadImage node). Sources: gallery URLs from search_gallery/get_inspiration, URLs from previous generate_image results, or local file paths."New value: +"Image references for style/content guidance. Accepts direct public HTTPS URLs without credentials/fragments or accessible absolute local paths. Relative paths are rejected. Local PNG/JPEG/WebP/GIF references up to 32 MiB and 64 million pixels are fully decoded, stripped of metadata and prepared up to 4096px, preserving transparency. For ComfyUI: local files are passed directly to the workflow (requires LoadImage node). Sources: gallery URLs from search_gallery/get_inspiration, URLs from previous generate_image results, or local file paths."
    • addedInput schema / properties / requestId
      Added value: +{
      +  "description": "Persistent UUID for this workflow step. Required when wait=false. Reuse with identical inputs after interruption, including after MCP restart; use a new UUID for a new generation. Omit only for a new interactive generation.",
      +  "format": "uuid",
      +  "type": "string"
      +}
    • addedInput schema / properties / wait
      Added value: +{
      +  "default": true,
      +  "description": "MeiGen only: false returns the accepted generation ID immediately; poll check_generation separately. Default true waits for completion. Submit-only requires requestId.",
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "creditsStatus": {
      +      "type": "string"
      +    },
      +    "creditsUsed": {
      +      "type": "number"
      +    },
      +    "deduped": {
      +      "type": "boolean"
      +    },
      +    "downloadWarning": {
      +      "type": "string"
      +    },
      +    "error": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "available": {
      +          "type": "number"
      +        },
      +        "code": {
      +          "type": "string"
      +        },
      +        "httpStatus": {
      +          "type": "number"
      +        },
      +        "message": {
      +          "type": "string"
      +        },
      +        "required": {
      +          "type": "number"
      +        },
      +        "retryAfterSeconds": {
      +          "type": "number"
      +        },
      +        "retryable": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "message",
      +        "retryable"
      +      ],
      +      "type": "object"
      +    },
      +    "generationId": {
      +      "type": "string"
      +    },
      +    "imageUrl": {
      +      "type": "string"
      +    },
      +    "mediaType": {
      +      "enum": [
      +        "image",
      +        "video"
      +      ],
      +      "type": "string"
      +    },
      +    "modelId": {
      +      "type": "string"
      +    },
      +    "nextAction": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "afterSeconds": {
      +          "type": "number"
      +        },
      +        "arguments": {
      +          "additionalProperties": {},
      +          "type": "object"
      +        },
      +        "message": {
      +          "type": "string"
      +        },
      +        "tool": {
      +          "type": "string"
      +        },
      +        "type": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type"
      +      ],
      +      "type": "object"
      +    },
      +    "observationEnded": {
      +      "type": "boolean"
      +    },
      +    "pollAfterSeconds": {
      +      "type": "number"
      +    },
      +    "provider": {
      +      "enum": [
      +        "meigen",
      +        "openai",
      +        "comfyui"
      +      ],
      +      "type": "string"
      +    },
      +    "receiptWarning": {
      +      "type": "string"
      +    },
      +    "requestId": {
      +      "type": "string"
      +    },
      +    "requestedMediaType": {
      +      "enum": [
      +        "image",
      +        "video"
      +      ],
      +      "type": "string"
      +    },
      +    "savedPath": {
      +      "type": "string"
      +    },
      +    "status": {
      +      "enum": [
      +        "processing",
      +        "completed",
      +        "failed",
      +        "error",
      +        "unknown"
      +      ],
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    },
      +    "urls": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "videoUrl": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "success",
      +    "status",
      +    "urls"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changedv1.3.3
    • changedInput schema / properties / model / description
      Previous value: -"Model name. For OpenAI-compatible providers: any model ID your endpoint supports. For MeiGen: use model IDs from list_models."New value: +"Model name. For OpenAI-compatible providers: any model ID your endpoint supports. For MeiGen: use model IDs from list_models (e.g. \"gpt-image-2\", \"grok-image\" = xAI Grok Imagine Quality, 1K/2K, supports image-to-image, \"nanobanana-2\", \"seedream-4.5\", \"flux2-klein\")."
  3. Addedv1.3.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already flag readOnlyHint=false and destructiveHint=true; the description adds a valuable behavioral rule: only append --sref for Midjourney when a style code is provided, and never pass URLs or local paths through it. This prevents a real misuse and clarifies referenceImages as the image-reference pathway. It does not explicitly discuss costs or file-writing side effects in the main description, but the annotations and schema cover part of that burden.

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?

Four dense sentences are front-loaded with the core operation and platform support. The tip and sref warning earn their place; there is no filler and no redundant restatement of what the schema already documents.

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?

Given 15 parameters and multiple provider backends, the description plus the rich schema covers the critical call decisions: provider, async wait behavior, reference images, and Midjourney style handling. It does not enumerate every provider quirk, but an output schema exists and the parameter descriptions are detailed, so the definition is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents 100% of the 15 parameters, so the baseline is 3. The description adds meaning beyond the schema by explaining the Midjourney --sref modifier (only when a style code exists) and by explicitly routing image-based references to referenceImages instead of the prompt.

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?

The description clearly states the operation ('Generate an image using AI') and names the supported backends (MeiGen, local ComfyUI, OpenAI-compatible APIs). It is generic enough to be distinguished from specialized siblings like generate_marketing_poster or generate_ai_background, but it does not explicitly name those alternatives for direct differentiation.

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 tip points the agent to get_inspiration/enhance_prompt for prompt quality and to gallery URLs for style reference, giving useful context about how to compose a call. However, it does not state when to choose this general generator over the specialized generation siblings, nor does it give exclusions or alternative routing conditions.

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