Skip to main content
Glama

Generate images and wait for them

imagine

Generate Midjourney images from a prompt, wait for the job to finish, and return direct image URLs. Set save to also write files and get local paths.

Instructions

Generate images from a prompt, wait for the job to finish, and return the results with direct image URLs. This is the tool to reach for by default: it does the whole job rather than handing back an id to poll.

A fast-mode job usually finishes in 30-60 seconds and this call blocks for that long. Relax mode queues and can take many minutes, so raise MIDJOURNEY_JOB_TIMEOUT_MS or use submit_imagine instead if you do not want to wait.

Set save to true to also write the files to disk and get back local paths, which is what you want when the images are going to be used rather than looked at.

Costs GPU time from the Midjourney plan and cannot be refunded, so it needs confirm: true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expNo0-100. Experimental aesthetics on v7. Sent as --exp.
rawNoShorthand for style 'raw'.
nijiNoNiji model version, for example '6'. The anime-oriented model line. Sent as --niji, and it ignores version.
saveNoAlso download the finished images to disk and return their local paths.
seedNo0-4294967295. Reusing a seed with an identical prompt gives a near-identical result, which is how you iterate on one image rather than rolling a new one. Sent as --seed.
stopNo10-100. Stop rendering early for a blurrier, faster result.
tileNoMake a seamlessly tiling image. Sent as --tile.
chaosNo0-100. How different the four results are from each other. Sent as --chaos.
draftNoDraft mode: much faster and cheaper, lower fidelity. Sent as --draft.
speedNoGeneration speed. 'fast' burns fast-hours and takes under a minute. 'relax' is unlimited on Standard and above but queues, often for several minutes. 'turbo' is quickest and costs double. Defaults to MIDJOURNEY_DEFAULT_SPEED, itself 'fast'.
styleNoStyle modifier, most usefully 'raw' for less automatic prettification. Sent as --style.
weirdNo0-3000. Pushes toward the unusual. Sent as --weird.
aspectNoAspect ratio as width:height, for example '16:9', '3:2', '1:1'. Sent as --ar.
promptYesThe subject text, in plain words. Do not put --parameters in here; use the fields below, which are validated before anything is spent. Midjourney reads the start of a prompt as the most important part.
repeatNo1-40. Run the prompt this many times. Multiplies the cost.
confirmNoMust be true for this to run. This call spends GPU time from the Midjourney plan, or cannot be undone, so it is refused without an explicit confirmation.
out_dirNoWhere to save, when save is true. Defaults to MIDJOURNEY_DOWNLOAD_DIR.
privateNoKeep the result off the public feed. Requires a plan that allows stealth mode.
profileNoPersonalisation profile id, or 'auto' for this account's own. Sent as --profile.
qualityNo0.25, 0.5, 1, 2 or 4. Render time and therefore cost. Sent as --q.
stylizeNo0-1000, and best left alone. Midjourney's own default sits low, and raising it trades fidelity for a processed look, so only set it when the user asks for more stylisation. Sent as --stylize.
versionNoModel version, for example '7' or '6.1'. Sent as --v. Cannot be combined with niji.
negativeNoThings to keep out, comma separated, for example 'text, watermark'. Sent as --no.
moodboardNoApply one of the account's moodboards, by name or id. Partial names work: 'High Fashion' finds 'High Fashion | Woman'. This is the same mechanism as selecting it in the web app's Personalize panel: the board becomes a personalization code on the prompt. It needs no style weight and does not compete with your wording, so prefer it over style_refs for any look the account has already curated. Call list_moodboards to see them.
omni_refsNoOmni references, for carrying a character or object across images. An image URL or 'random'. Sent as --oref. This is the v7 replacement for --cref.
style_refsNoStyle references, each an image URL, a numeric style code, or 'random'. Sent as --sref. Anything else is silently treated as prompt text by Midjourney, so this is validated here first.
timeout_msNoHow long to wait before giving up on the job. Defaults to MIDJOURNEY_JOB_TIMEOUT_MS.
omni_weightNo0-1000. How strongly omni references apply. Sent as --ow.
image_weightNo0-3. How much the image prompts matter against the text. Sent as --iw.
style_weightNo0-1000. How strongly style references apply. Leave unset unless the references are being ignored: a high value overwhelms the prompt and reads as over-processed.
image_promptsNoDirect URLs to images used as visual input, each ending in .png, .jpg, .jpeg, .webp or .gif. A link to the page an image sits on will not work. These are prepended to the prompt, which is what Midjourney expects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.3.0
    • changedInput schema / properties / moodboard / description
      Previous value: -"Use one of the account's moodboards as the style, by name or id. Partial names work: 'High Fashion' finds 'High Fashion | Woman'. Its images are sent as style references, so this is the shorthand for building a look you have already curated. Call list_moodboards to see them."New value: +"Apply one of the account's moodboards, by name or id. Partial names work: 'High Fashion' finds 'High Fashion | Woman'.\n\nThis is the same mechanism as selecting it in the web app's Personalize panel: the board becomes a personalization code on the prompt. It needs no style weight and does not compete with your wording, so prefer it over style_refs for any look the account has already curated. Call list_moodboards to see them."
    • removedInput schema / properties / moodboard_refs
      Removed value: -{
      -  "description": "How many images to take from the moodboard, 1-10. Defaults to 4. They are spread across the board rather than taken from the front, so a large board does not always draw on its oldest images.",
      -  "maximum": 10,
      -  "minimum": 1,
      -  "type": "integer"
      -}
    • changedInput schema / properties / style_weight / description
      Previous value: -"0-1000. How strongly the style references apply. Sent as --sw."New value: +"0-1000. How strongly style references apply. Leave unset unless the references are being ignored: a high value overwhelms the prompt and reads as over-processed."
    • changedInput schema / properties / stylize / description
      Previous value: -"0-1000. How strongly Midjourney applies its own aesthetic. Low follows the prompt literally, high makes prettier but less faithful images. Default is 100. Sent as --stylize."New value: +"0-1000, and best left alone. Midjourney's own default sits low, and raising it trades fidelity for a processed look, so only set it when the user asks for more stylisation. Sent as --stylize."
  2. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover readOnly=false, idempotent=false, openWorld, destructive=false. The description adds substantial behavior beyond that: blocking duration by speed mode (30-60s fast, minutes in relax), timeout tuning via MIDJOURNEY_JOB_TIMEOUT_MS, disk-write side effect of save, non-refundable GPU cost, and the hard confirm:true gate. That is rich, non-obvious operational context.

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 short paragraphs, front-loaded with the core identity before the caveats. Every sentence carries a distinct constraint (default choice, wait time, save semantics, cost/confirm) with no filler.

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 31-parameter, no-output-schema tool, the description covers the call-shaping essentials: blocking behavior, timeout escape, save side effect, and the confirmation requirement. It does not attempt to summarize the many style/weight parameters, which the 100%-covered schema handles, so the omission is mostly acceptable.

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 baseline is 3, but the description adds meaning the schema does not: save is framed by intent ('what you want when the images are going to be used rather than looked at'), and confirm and timeout_ms are explained as spend-control and wait-control mechanisms. It does not restate per-parameter syntax, which the schema already handles.

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?

States a specific verb and resource ('Generate images from a prompt, wait for the job to finish, and return the results') and explicitly distinguishes itself from the sibling that returns an id to poll. An agent can tell it apart from submit_imagine, get_job, and wait_for_job without opening any schema.

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?

States it is the default tool to reach for, gives the concrete condition that would push you elsewhere (relax-mode wait time), and names the alternative directly ('use submit_imagine instead if you do not want to wait'). This is explicit when-to-use and when-not guidance.

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