Skip to main content
Glama
jau123

MeiGen AI Image Generation MCP

by jau123

generate_image

Destructive

Generate an image using AI. Supports MeiGen platform or OpenAI-compatible APIs. Tip: get prompts from get_inspiration() or enhance_prompt().

Instructions

Generate an image using AI. Supports MeiGen platform or OpenAI-compatible APIs. Tip: get prompts from get_inspiration() or enhance_prompt(). For MeiGen Midjourney, use referenceType for content/style images and niji7Options for stylize, chaos, raw, image/style weights, sref, profile and MJ quality. Inline --sref/--profile codes remain compatible; other prompt flags are cleaned by the backend. Use referenceImages for local files.

Input Schema

NameRequiredDescriptionDefault
sizeNoImage size for OpenAI-compatible providers: "1024x1024", "1536x1024", "auto". MeiGen: 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.
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).
modelVariantNoOptional model variant from live list_models, such as a supported GPT Image 2.5 variant. Forwarded unchanged to MeiGen.
niji7OptionsNoMeiGen Midjourney advanced options, matching Web/App. Prefer these over prompt flags; V8.2 ignores weird and fixes sv=6. Preserve identical options on recovery.
referenceTypeNoMeiGen Midjourney uploaded-image role; default content. Style images override niji7Options.sref; saved characters remain content references.
negativePromptNoNegative prompt for OpenAI-compatible providers.
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. Sources: gallery URLs from search_gallery/get_inspiration, URLs from previous generate_image results, or local file paths.

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv3.3.0
    • addedInput schema / properties / niji7Options
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "MeiGen Midjourney advanced options, matching Web/App. Prefer these over prompt flags; V8.2 ignores weird and fixes sv=6. Preserve identical options on recovery.",
      +  "properties": {
      +    "chaos": {
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "iw": {
      +      "description": "Content image weight; Niji supports at most 2.",
      +      "maximum": 3,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "profile": {
      +      "maxLength": 4096,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "quality": {
      +      "description": "MJ V8.2 quality; separate from top-level image quality.",
      +      "enum": [
      +        "1",
      +        "4"
      +      ],
      +      "type": "string"
      +    },
      +    "raw": {
      +      "type": "boolean"
      +    },
      +    "sref": {
      +      "maxLength": 4096,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "stylize": {
      +      "maximum": 1000,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "sv": {
      +      "description": "Legacy style version; V8.2 always uses 6.",
      +      "maximum": 6,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "sw": {
      +      "maximum": 1000,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "weird": {
      +      "description": "V7/Niji only; ignored by V8.2.",
      +      "maximum": 3000,
      +      "minimum": 0,
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / referenceType
      Added value: +{
      +  "description": "MeiGen Midjourney uploaded-image role; default content. Style images override niji7Options.sref; saved characters remain content references.",
      +  "enum": [
      +    "content",
      +    "style"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / failureDetail
      Added value: +{
      +  "enum": [
      +    "video_edit_duration",
      +    "reference_video_frame_rate"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field changedv3.2.0
    • addedOutput schema / properties / seedanceDraft
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "duration": {
      +      "type": "number"
      +    },
      +    "expiresAt": {
      +      "type": "string"
      +    },
      +    "finalCredits": {
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "finalGenerationId": {
      +      "type": "string"
      +    },
      +    "hasReferenceVideo": {
      +      "type": "boolean"
      +    },
      +    "referenceVideoSeconds": {
      +      "type": "number"
      +    },
      +    "sourceGenerationId": {
      +      "type": "string"
      +    },
      +    "stage": {
      +      "enum": [
      +        "draft",
      +        "final"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "stage",
      +    "duration",
      +    "referenceVideoSeconds",
      +    "hasReferenceVideo"
      +  ],
      +  "type": "object"
      +}
  3. Changed7 schema fields changedv3.1.0
    • changedInput schema / properties / aspectRatio / description
      Previous value: -"Aspect 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."New value: +"Aspect 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)."
    • changedInput schema / properties / negativePrompt / description
      Previous value: -"Negative prompt for OpenAI-compatible providers. ComfyUI: use comfyui_workflow modify to set negative prompt in the workflow before generating."New value: +"Negative prompt for OpenAI-compatible providers."
    • changedInput schema / properties / provider / enum
      Previous value: -[
      -  "openai",
      -  "meigen",
      -  "comfyui"
      -]New value: +[
      +  "openai",
      +  "meigen"
      +]
    • changedInput schema / properties / referenceImages / description
      Previous 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."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. Sources: gallery URLs from search_gallery/get_inspiration, URLs from previous generate_image results, or local file paths."
    • changedInput schema / properties / size / description
      Previous value: -"Image size for OpenAI-compatible providers: \"1024x1024\", \"1536x1024\", \"auto\". MeiGen/ComfyUI: use aspectRatio instead."New value: +"Image size for OpenAI-compatible providers: \"1024x1024\", \"1536x1024\", \"auto\". MeiGen: use aspectRatio instead."
    • removedInput schema / properties / workflow
      Removed value: -{
      -  "description": "ComfyUI workflow name to use (from comfyui_workflow list). Uses default workflow if not specified.",
      -  "type": "string"
      -}
    • changedOutput schema / properties / provider / enum
      Previous value: -[
      -  "meigen",
      -  "openai",
      -  "comfyui"
      -]New value: +[
      +  "meigen",
      +  "openai"
      +]
  4. 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"
      +}
  5. 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\")."
  6. Addedv1.3.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations declare a non-read-only, destructive operation, so the mutation nature is already conveyed. The description adds genuine behavioral detail the annotations don't: backend prompt-flag cleaning, MeiGen vs OpenAI compatibility, and --sref/--profile inline compatibility. It omits the practically important traits for an image generator — cost, latency, and that wait=false requires requestId (only in the schema).

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?

Front-loaded with the core action, then progressively more specific tips. Dense but justified by 16 parameters and two divergent provider paths. Minor cost: an unlabeled list of Midjourney options that an agent must map back to the schema.

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, so return values need not be explained, and the description correctly focuses on provider differences and reference-image mechanics. It is nearly complete for a 16-parameter tool, though it leaves out cost/latency expectations and the wait/check_generation polling workflow that the schema only implies.

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 coverage is 100%, so the baseline is 3 and the schema already explains every parameter including the nested niji7Options. The description does add cross-parameter semantics not obvious from the schema — that referenceType overrides niji7Options.sref and that referenceImages is the route for local files — but most of its parameter prose restates schema content.

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?

Opens with a specific verb+resource ("Generate an image using AI") and immediately names the two supported backends, which distinguishes it from siblings like generate_video or generate_ai_background. It does not explicitly contrast with those image-producing siblings, 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.

Usage Guidelines3/5

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

Gives actionable routing hints ("get prompts from get_inspiration() or enhance_prompt()", "use referenceType for content/style images"), which is more than implied usage. However it never states when NOT to use this tool versus generate_ai_background, generate_marketing_poster, or upscale_image, and gives no guidance on choosing provider beyond what the schema already says.

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