Skip to main content
Glama

Wait for a job to finish

wait_for_job
Read-onlyIdempotent

Wait for a Midjourney job to finish, fail, or be moderated, then retrieve its image URLs. Polls with widening intervals and times out without canceling the job.

Instructions

Block until a job reaches a finished, failed or moderated state, then return it with its image URLs.

The poll interval widens as the wait goes on, so a long relax-mode job does not turn into hundreds of requests. Times out after MIDJOURNEY_JOB_TIMEOUT_MS, ten minutes by default; a timeout does not cancel the job, it is still running.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYesThe job id to wait on.
timeout_msNoGive up after this long. Defaults to MIDJOURNEY_JOB_TIMEOUT_MS.
Install Server

TDQS

A4.6/5.0
Behavior5/5

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

Over and above the annotations (readOnlyHint, idempotentHint), the description reveals significant runtime behavior: poll interval widens to avoid request floods, a default timeout of ten minutes applies, and a timeout does not cancel the job. These details prevent agents from assuming a timeout means failure or from polling aggressively.

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?

The core behavior is front-loaded in the first sentence, with the non-obvious timeout and polling behavior in a concise second paragraph. Every sentence carries information; there is 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?

The description covers the success return (job with image URLs), the default timeout, and what a timeout does not do. With no output schema it could be even more explicit about what the call returns or throws on timeout, but the essentials for safe invocation are present.

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?

With 100% schema coverage the baseline is 3, but the description adds valuable nuance to timeout_ms: the wait times out after MIDJOURNEY_JOB_TIMEOUT_MS by default and a timeout leaves the job running. This complements the schema's 'Give up after this long' note.

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 names a specific verb ('Block'), a resource (a job), and the target outcome (finished, failed or moderated state with image URLs). This clearly distinguishes it from sibling tools like get_job or job_updates, which do not promise blocking until a terminal state.

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

Usage Guidelines4/5

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

The description says exactly when to use the tool: when you need to wait until a job reaches a terminal state and get its image URLs. It doesn't explicitly name alternatives that should be used instead, but the blocking focus makes the intended usage clear and there are no misleading exclusions.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thenavidm/midjourney-mcp-cli'

If you have feedback or need assistance with the MCP directory API, please join our Discord server