Skip to main content
Glama
jau123

MeiGen AI Image Generation MCP

by jau123

generate_ai_background

Replace a product photo's background with a white backdrop, AI-selected scene, or custom prompt. Upload one product image and get a new background in your chosen mode.

Instructions

Create one product photo with a new background. Required: one actual product photo. White mode produces a fixed white background; smart chooses a scene; custom needs a background description, inferred from the request when present (e.g. a beach). Background references are not required. Use remove_background for transparent PNG cutouts. Requires a MeiGen API key configured for this local npm server (MEIGEN_API_TOKEN or saved local configuration), and purchased credits only. Local files and external public HTTPS URLs are uploaded automatically. Use the dedicated skill directly; skip unrequested prompt enhancement, preference loading and delegation. Preserve caller-supplied inputs. Infer omitted optional settings from the request and defaults; when only a requested count is known, choose suitable modules unless the caller selected them. Ask only for missing required material or unresolved scope. An explicit user request or authorized upstream workflow establishes its count, quality and budget: do not reconfirm that scope or add paid images. The caller persists a requestId for each logical step; never ask an end user for technical IDs. Use live list_skills prices and account for in-flight charges when planning within a budget; a batch is not atomic and an estimate is not a server-enforced spending cap. Recovery actions take precedence over generic retry advice: check an interrupted submission, preserve exact retryParameters and do not create a new ID or replace failed modules automatically. Retry a temporary upload at most once after the suggested wait. Return structured status, handles, errors and completed URLs to the caller; it owns progress, previews, downloads and final presentation. If interacting directly with the user, explain the problem and a concrete next step in their language. Describe image details only after actual inspection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNowhite=fixed white-background output; smart=AI chooses a suitable scene (default); custom=customPrompt required.
ratioNoSupported output ratio from list_skills for this Skill; omit for its default. Smart/custom only; auto matches source proportions. Ignored in white mode.
qualityNoSmart/custom only: fast=1K default, hd=2K; ignored in white mode.
requestIdYesGenerate a new UUID for a new paid request; reuse the SAME requestId and inputs on retry. Use check_skill after interruptions.
customPromptNoRequired in custom mode: describe the desired background and lighting.
productImageYesRequired product photo: preserve the product while replacing its surroundings. Do not pre-remove its background. An accessible absolute local path (Windows drive/UNC, POSIX, ~/, or file://) or public direct HTTPS image URL without credentials, fragments or custom ports. Relative paths are ambiguous and rejected. Files are fully decoded, metadata removed, transparency preserved; GIF uses the first frame. Never invent attachment paths or URLs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.1

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full disclosure burden and meets it thoroughly: it discloses authentication requirements (MEIGEN_API_TOKEN or saved local config), purchased-credit gating, automatic upload of local files and HTTPS URLs, non-atomic batch behavior, lack of a server-enforced spending cap, exact retry semantics (same requestId, at most one retry after suggested wait), and recovery-action precedence over generic retry advice.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded and the opening sentences are tight, but the description becomes a dense wall of operational policy — budget planning, requestId persistence, user-interaction language, and progress ownership — with some redundancy (e.g., asking only for missing material vs. explaining problems to the user). Most sentences carry information, but the length strains conciseness.

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?

For a complex 6-parameter tool with no annotations and no output schema, the description is unusually complete: it covers auth, cost accounting, upload behavior, retry/recovery semantics, and return expectations ('structured status, handles, errors and completed URLs'). The only minor gap is that it doesn't describe the concrete shape of the success/failure return structure, but it says the caller owns presentation, which covers the essentials.

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?

Schema coverage is 100%, so baseline is 3, and the description adds real value on top: mode/customPrompt interdependence ('custom=customPrompt required'), ratio and quality being smart/custom-only and ignored in white mode, and nuanced productImage semantics (do not pre-remove background, no credentials/fragments/custom ports, GIF first frame, never invent paths). This exceeds the baseline meaningfully.

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 first sentence states a specific verb and resource — 'Create one product photo with a new background' — and the three modes (white/smart/custom) are clearly enumerated. It distinguishes itself from siblings by explicitly naming remove_background for transparent PNG cutouts, so an agent can differentiate it without opening schemas.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use and when-not-to-use guidance: 'Use remove_background for transparent PNG cutouts', 'Use the dedicated skill directly; skip unrequested prompt enhancement, preference loading and delegation', and 'Use live list_skills prices'. It also directs recovery flows to check_skill and names the sibling for pricing lookups, leaving little to inference.

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