Skip to main content
Glama

Generate Image (Popcraft)

popcraft_generate_image

STOP FIRST if the ask is a YouTube/Instagram THUMBNAIL, a video COVER or packaging art, a UGC or product AD, or any other multi-step branded production: call popcraft_get_workflow_instructions and follow the matching workflow instead of calling this tool directly — it owns the concept frameworks, prompt structure, identity locks and QA that a one-shot prompt misses. Everything else (a plain image, an illustration, a single reference-driven render) belongs here — call it directly, no workflow needed — EXCEPT when the target model advertises prompt_guide_workflow in popcraft_models_explore (GPT Image 2.5 / gpt-image-2-5 and gpt-image-2-5-fast → "gpt-image-25-prompting"): for any directed job on such a model (an EDIT that must preserve a face/product/layout, reference images, exact in-frame text, a transparent cutout, or an "expand/optimize my prompt" ask) load that workflow first. Generate images with Popcraft — GPT Image 2, Seedream, Nano Banana, Midjourney and more. Defaults: aspect_ratio "1:1", resolution model-default, count 1 (must be 1, 2, or 4 — the Popcraft pricing tiers). Pass medias (GCS urls from popcraft_media_import_url or a prior popcraft_generate_image/popcraft_job_display result) with role:"reference" for a reference image (style/composition/subject transfer) or role:"video" for a video reference when the model accepts video input (e.g. Nano Banana 2). Omit medias for pure text-to-image. Pick model via popcraft_models_explore first if unsure — references are validated against the model before charging (count, media type, size, format), so check its reference_limits/image_input to avoid a rejected call. Set get_cost:true to preview the exact credit cost WITHOUT submitting a job — always do this before a first-time or expensive generation so the user can confirm. Local files attached in chat cannot be read by this remote server — use popcraft_media_upload_widget (or popcraft_media_upload) instead of asking for attachments. If a result carries recovery_tool, call that tool immediately; do not explain or ask first. On success, an interactive result card is shown to the user and refreshes itself automatically until the job finishes — do NOT poll or re-check status in a loop. Call popcraft_job_display at most once, and only if this client did not render a result card or the user asks about the job again later. The result includes project — the Popcraft project the output was filed into; when the user did not pass project_id/project_name, mention it briefly (e.g. "saved to ") so they know where it landed. Never tell the user how long the job will take or quote any estimate of generation time — the result card shows progress.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "model": "<model>"
    },
    "name": "popcraft_generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNoNumber of images: 1, 2, or 4 (Popcraft pricing tiers) — default 1
modelYesPopcraft model id, e.g. "gpt-image-2", "seedream-4-0", "nano-banana" — list via popcraft_models_explore
mediasNoReferences as GCS URLs from popcraft_media_import_url or prior results; role:"reference" for images, role:"video" for video-capable image models (check reference_limits.video)
promptNoText prompt describing the image to generate
get_costNotrue = return the exact credit cost WITHOUT submitting; use this before a first-time or expensive generation
project_idNoFile the result into this Popcraft project (id from popcraft_projects). Omit to use the user's current/last-used project (or a default). Errors if you don't own it.
resolutionNoModel-specific resolution/size string, e.g. "1K", "2K" — omit for the model default
aspect_ratioNoe.g. "1:1", "16:9", "9:16", "4:3" — default "1:1"
project_nameNoFile the result into the project with this title, creating it if it doesn't exist. Ignored when project_id is set.
seedream_optionsNoSeedream 5.5 only: custom size, background, png/jpeg, standard prompt optimisation, safety identifier, layer decomposition with max_images 2–100 and optional provider OCR. Layer splitting reserves its output cap and refunds unused outputs.
gpt_image_optionsNoGPT Image 2.6 only: quality, complexity, png/jpeg/webp/gif/svg, transparent background, size, compression, GIF frame count/timing, mask_url or markup_url. SVG is generation-only; GIF has no masks. GIF size is per frame and usually best omitted: the frame size then follows aspect_ratio at about 512x512 of area. Frames are tiled into a fixed grid (4x2 or 2x4 up to 8 frames, 3x3 for 9, 4x3/3x4/4x4 for 10-12, 4x4 for 13-16) that must stay within 3840 px per edge and 8,294,400 px, empty cells included: up to 8 frames, each frame at most 960x1920 or 1920x960 and 1,036,800 px; 512x512 always fits. Oversized requests are rejected before charging. Overlay PNG must match the first reference. SVG author is configured automatically. These options affect the quoted price.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / gpt_image_options / description
      Previous value: -"GPT Image 2.6 only: quality, complexity, png/jpeg/webp/gif/svg, transparent background, size, compression, GIF frame count/timing, mask_url or markup_url. SVG is generation-only; GIF has no masks. Overlay PNG must match the first reference. SVG author is configured automatically. These options affect the quoted price."New value: +"GPT Image 2.6 only: quality, complexity, png/jpeg/webp/gif/svg, transparent background, size, compression, GIF frame count/timing, mask_url or markup_url. SVG is generation-only; GIF has no masks. GIF size is per frame and usually best omitted: the frame size then follows aspect_ratio at about 512x512 of area. Frames are tiled into a fixed grid (4x2 or 2x4 up to 8 frames, 3x3 for 9, 4x3/3x4/4x4 for 10-12, 4x4 for 13-16) that must stay within 3840 px per edge and 8,294,400 px, empty cells included: up to 8 frames, each frame at most 960x1920 or 1920x960 and 1,036,800 px; 512x512 always fits. Oversized requests are rejected before charging. Overlay PNG must match the first reference. SVG author is configured automatically. These options affect the quoted price."
  2. Changed1 schema field changed
    • addedInput schema / properties / gpt_image_options
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "GPT Image 2.6 only: quality, complexity, png/jpeg/webp/gif/svg, transparent background, size, compression, GIF frame count/timing, mask_url or markup_url. SVG is generation-only; GIF has no masks. Overlay PNG must match the first reference. SVG author is configured automatically. These options affect the quoted price.",
      +  "properties": {
      +    "background": {
      +      "enum": [
      +        "auto",
      +        "opaque",
      +        "transparent"
      +      ],
      +      "type": "string"
      +    },
      +    "complexity": {
      +      "enum": [
      +        "low",
      +        "medium",
      +        "high"
      +      ],
      +      "type": "string"
      +    },
      +    "frame_count": {
      +      "maximum": 16,
      +      "minimum": 2,
      +      "type": "integer"
      +    },
      +    "frame_duration_ms": {
      +      "maximum": 2000,
      +      "minimum": 20,
      +      "type": "integer"
      +    },
      +    "markup_url": {
      +      "$ref": "#/properties/gpt_image_options/properties/mask_url"
      +    },
      +    "mask_url": {
      +      "maxLength": 4096,
      +      "type": "string"
      +    },
      +    "output_compression": {
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "output_format": {
      +      "enum": [
      +        "png",
      +        "jpeg",
      +        "webp",
      +        "gif",
      +        "svg"
      +      ],
      +      "type": "string"
      +    },
      +    "quality": {
      +      "enum": [
      +        "auto",
      +        "low",
      +        "medium",
      +        "high",
      +        "xhigh",
      +        "max"
      +      ],
      +      "type": "string"
      +    },
      +    "size": {
      +      "pattern": "^(auto|[1-9]\\d{0,4}x[1-9]\\d{0,4})$",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / seedream_options
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Seedream 5.5 only: custom size, background, png/jpeg, standard prompt optimisation, safety identifier, layer decomposition with max_images 2–100 and optional provider OCR. Layer splitting reserves its output cap and refunds unused outputs.",
      +  "properties": {
      +    "background": {
      +      "enum": [
      +        "auto",
      +        "opaque",
      +        "transparent"
      +      ],
      +      "type": "string"
      +    },
      +    "layer_decomposition": {
      +      "type": "boolean"
      +    },
      +    "layer_decomposition_options": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "max_images": {
      +          "maximum": 100,
      +          "minimum": 2,
      +          "type": "integer"
      +        },
      +        "text_recognition": {
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "optimize_prompt_options": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "mode": {
      +          "const": "standard",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "mode"
      +      ],
      +      "type": "object"
      +    },
      +    "output_format": {
      +      "enum": [
      +        "png",
      +        "jpeg"
      +      ],
      +      "type": "string"
      +    },
      +    "safety_identifier": {
      +      "maxLength": 64,
      +      "minLength": 1,
      +      "pattern": "^[\\x21-\\x7e]+$",
      +      "type": "string"
      +    },
      +    "size": {
      +      "pattern": "^(?:1K|1\\.5K|2K|auto|[1-9]\\d{0,4}x[1-9]\\d{0,4})$",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  4. Changed1 schema field changed
    • changedInput schema / properties / medias / description
      Previous value: -"Reference images as GCS URLs from popcraft_media_import_url or prior results; role:\"reference\" conditions the generation on the image (style/composition/subject transfer)"New value: +"References as GCS URLs from popcraft_media_import_url or prior results; role:\"reference\" for images, role:\"video\" for video-capable image models (check reference_limits.video)"
  5. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, it discloses credit charging and pre-charge validation, get_cost preview behavior, recovery_tool handling, automatic result-card refresh, and the instruction not to poll. It also explains project filing and upload limitations, which are important behavioral constraints for a non-idempotent, open-world generation tool.

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 description is information-dense but long, with a wall of conditional routing before the core purpose statement. Several defaults such as aspect_ratio, count, and get_cost repeat schema documentation, and the many parenthetical exceptions make it harder to scan, though most sentences carry useful guidance.

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?

Given 11 parameters, nested model-specific option objects, and no output schema, the description covers the operational context an agent needs: routing, cost preview, media roles, upload path, recovery behavior, result-card handling, and project filing. Nothing critical for correct invocation is missing.

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 the schema already documents most parameters; the description adds meaningful detail such as the role values for medias, model selection through popcraft_models_explore, and reference validation against reference_limits/image_input before charging. It also restates some schema defaults, so it is strong but not purely additive.

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 states a specific verb and resource ('Generate images with Popcraft') and names the supported model families. It also explicitly distinguishes this tool from popcraft_get_workflow_instructions for branded multi-step production, so an agent can identify it as the direct one-shot image generation tool.

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?

It gives explicit when-to-use and when-not-to-use rules: thumbnails, covers, UGC/product ads, and other multi-step branded production route to popcraft_get_workflow_instructions, while plain images, illustrations, and single reference-driven renders use this tool directly. It also names a model-specific exception for prompt_guide_workflow and tells the agent to select models via popcraft_models_explore.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.