Skip to main content
Glama

wait_images

Read-onlyIdempotent

Await existing requestId, batchId or taskIds; never submit new generation. Wait defaults to 24 seconds, maximum 45; native pages deliver 6 previews, links pages 32 originals. Returns status, complete, tasks, counts, pendingTaskIds, resultManifest and nextAction when continuation is needed. Display ready images, then call nextAction.tool with its exact arguments/cursor. Pending is not failure; report actual failed tasks with error/settlement. For one-task cancellation use generation_status. When the wait expires, return the latest snapshot with complete=false while work or delivery remains; resume nextAction without regenerating. Failed tasks remain in tasks with error/failure and settlement. Invalid or unauthorized lookups return a tool error, not a new task.

Input Schema

NameRequiredDescriptionDefault
cursorNoOpaque nextAction continuation cursor; copy unchanged. Omit only to replay already delivered images.
batchIdNoOriginal batch receipt; choose exactly one of batchId, requestId or taskIds.
taskIdsNoExplicit task IDs; alternative to batchId or requestId.
requestIdNoOriginal single-image preview receipt; alternative to batchId or taskIds.
deliveryModeNonative returns previews and original links; links returns original links; metadata omits image delivery.
timeoutSecondsNoBounded server wait; default 24 seconds, maximum 45. A pending response is not a failed task.

Output Schema

NameRequiredDescriptionDefault
tasksYes
failedYes
statusYes
batchIdNo
completeYes
failuresNo
requestIdNo
succeededYes
nextActionNo
settlementNo
deliveryModeNonative returns previews and original links; links returns original links; metadata omits image delivery.
imageProgressYes
acceptedImagesNo
pendingTaskIdsNo
resultManifestNo
requestedImagesNo
unsubmittedImagesNo
submissionCompleteYes
readyImagesRemainingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "acceptedImages": {
      +      "type": "integer"
      +    },
      +    "batchId": {
      +      "type": "string"
      +    },
      +    "complete": {
      +      "type": "boolean"
      +    },
      +    "deliveryMode": {
      +      "description": "native returns previews and original links; links returns original links; metadata omits image delivery.",
      +      "enum": [
      +        "native",
      +        "links",
      +        "metadata"
      +      ],
      +      "type": "string"
      +    },
      +    "failed": {
      +      "type": "integer"
      +    },
      +    "failures": {
      +      "items": {
      +        "properties": {
      +          "error": {
      +            "type": "string"
      +          },
      +          "index": {
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "index",
      +          "error"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "imageProgress": {
      +      "properties": {
      +        "failed": {
      +          "type": "integer"
      +        },
      +        "pending": {
      +          "type": "integer"
      +        },
      +        "ready": {
      +          "type": "integer"
      +        },
      +        "total": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "total",
      +        "ready",
      +        "failed",
      +        "pending"
      +      ],
      +      "type": "object"
      +    },
      +    "nextAction": {
      +      "properties": {
      +        "arguments": {
      +          "properties": {
      +            "action": {
      +              "type": "string"
      +            },
      +            "batchId": {
      +              "type": "string"
      +            },
      +            "cursor": {
      +              "type": "string"
      +            },
      +            "deliveryMode": {
      +              "enum": [
      +                "native",
      +                "links",
      +                "metadata"
      +              ],
      +              "type": "string"
      +            },
      +            "requestId": {
      +              "type": "string"
      +            },
      +            "seenImages": {
      +              "additionalProperties": {
      +                "items": {
      +                  "type": "integer"
      +                },
      +                "type": "array"
      +              },
      +              "type": "object"
      +            },
      +            "taskIds": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "timeoutSeconds": {
      +              "type": "integer"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "presentReadyFirst": {
      +          "type": "boolean"
      +        },
      +        "silent": {
      +          "type": "boolean"
      +        },
      +        "tool": {
      +          "enum": [
      +            "wait_images",
      +            "batch_generate"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "tool",
      +        "arguments",
      +        "silent",
      +        "presentReadyFirst"
      +      ],
      +      "type": "object"
      +    },
      +    "pendingTaskIds": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "readyImagesRemaining": {
      +      "type": "integer"
      +    },
      +    "requestId": {
      +      "type": "string"
      +    },
      +    "requestedImages": {
      +      "type": "integer"
      +    },
      +    "resultManifest": {
      +      "properties": {
      +        "inputs": {
      +          "items": {
      +            "properties": {
      +              "count": {
      +                "type": "integer"
      +              },
      +              "index": {
      +                "type": "integer"
      +              },
      +              "status": {
      +                "type": "string"
      +              },
      +              "taskId": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "index",
      +              "taskId",
      +              "count",
      +              "status"
      +            ],
      +            "type": "object"
      +          },
      +          "type": [
      +            "array",
      +            "null"
      +          ]
      +        },
      +        "requestedImages": {
      +          "type": "integer"
      +        },
      +        "results": {
      +          "items": {
      +            "properties": {
      +              "imageIndex": {
      +                "type": "integer"
      +              },
      +              "inputIndex": {
      +                "type": "integer"
      +              },
      +              "resultId": {
      +                "type": "string"
      +              },
      +              "saved": {
      +                "type": "boolean"
      +              },
      +              "settlement": {
      +                "properties": {
      +                  "chargedPoints": {
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "estimatedMaxPoints": {
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "netChargedPoints": {
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "quotedMaxPoints": {
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "refundedPoints": {
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "status": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "status"
      +                ],
      +                "type": "object"
      +              },
      +              "status": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "resultId",
      +              "inputIndex",
      +              "imageIndex",
      +              "status",
      +              "saved"
      +            ],
      +            "type": "object"
      +          },
      +          "type": [
      +            "array",
      +            "null"
      +          ]
      +        },
      +        "version": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "version",
      +        "requestedImages",
      +        "inputs",
      +        "results"
      +      ],
      +      "type": "object"
      +    },
      +    "settlement": {
      +      "properties": {
      +        "chargedPoints": {
      +          "minimum": 0,
      +          "type": "number"
      +        },
      +        "estimatedMaxPoints": {
      +          "minimum": 0,
      +          "type": "number"
      +        },
      +        "netChargedPoints": {
      +          "minimum": 0,
      +          "type": "number"
      +        },
      +        "quotedMaxPoints": {
      +          "minimum": 0,
      +          "type": "number"
      +        },
      +        "refundedPoints": {
      +          "minimum": 0,
      +          "type": "number"
      +        },
      +        "status": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "status"
      +      ],
      +      "type": "object"
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "submissionComplete": {
      +      "type": "boolean"
      +    },
      +    "succeeded": {
      +      "type": "integer"
      +    },
      +    "tasks": {
      +      "items": {
      +        "properties": {
      +          "cancelRequested": {
      +            "type": "boolean"
      +          },
      +          "deliveryStatus": {
      +            "type": "string"
      +          },
      +          "error": {
      +            "type": "string"
      +          },
      +          "failedImages": {
      +            "items": {
      +              "properties": {
      +                "error": {
      +                  "type": "string"
      +                },
      +                "failure": {
      +                  "properties": {
      +                    "code": {
      +                      "type": "string"
      +                    },
      +                    "nextAction": {
      +                      "type": "string"
      +                    },
      +                    "retryable": {
      +                      "type": "boolean"
      +                    }
      +                  },
      +                  "required": [
      +                    "code",
      +                    "retryable",
      +                    "nextAction"
      +                  ],
      +                  "type": "object"
      +                },
      +                "index": {
      +                  "type": "integer"
      +                },
      +                "settlement": {
      +                  "properties": {
      +                    "chargedPoints": {
      +                      "minimum": 0,
      +                      "type": "number"
      +                    },
      +                    "estimatedMaxPoints": {
      +                      "minimum": 0,
      +                      "type": "number"
      +                    },
      +                    "netChargedPoints": {
      +                      "minimum": 0,
      +                      "type": "number"
      +                    },
      +                    "quotedMaxPoints": {
      +                      "minimum": 0,
      +                      "type": "number"
      +                    },
      +                    "refundedPoints": {
      +                      "minimum": 0,
      +                      "type": "number"
      +                    },
      +                    "status": {
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "status"
      +                  ],
      +                  "type": "object"
      +                }
      +              },
      +              "required": [
      +                "index",
      +                "error"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "failure": {
      +            "properties": {
      +              "code": {
      +                "type": "string"
      +              },
      +              "nextAction": {
      +                "type": "string"
      +              },
      +              "retryable": {
      +                "type": "boolean"
      +              }
      +            },
      +            "required": [
      +              "code",
      +              "retryable",
      +              "nextAction"
      +            ],
      +            "type": "object"
      +          },
      +          "generation": {
      +            "type": "object"
      +          },
      +          "imageProgress": {
      +            "properties": {
      +              "failed": {
      +                "type": "integer"
      +              },
      +              "pending": {
      +                "type": "integer"
      +              },
      +              "ready": {
      +                "type": "integer"
      +              },
      +              "total": {
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "total",
      +              "ready",
      +              "failed",
      +              "pending"
      +            ],
      +            "type": "object"
      +          },
      +          "images": {
      +            "items": {
      +              "properties": {
      +                "deliveryStatus": {
      +                  "type": "string"
      +                },
      +                "expired": {
      +                  "type": "boolean"
      +                },
      +                "expiresAt": {
      +                  "type": "string"
      +                },
      +                "height": {
      +                  "type": "integer"
      +                },
      +                "index": {
      +                  "type": "integer"
      +                },
      +                "linkExpiresAt": {
      +                  "type": "string"
      +                },
      +                "mimeType": {
      +                  "type": "string"
      +                },
      +                "retainedUntil": {
      +                  "type": "string"
      +                },
      +                "revisedPrompt": {
      +                  "type": "string"
      +                },
      +                "width": {
      +                  "type": "integer"
      +                }
      +              },
      +              "required": [
      +                "index"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "lineage": {
      +            "type": "object"
      +          },
      +          "notice": {
      +            "type": "string"
      +          },
      +          "outputContract": {
      +            "type": "object"
      +          },
      +          "settlement": {
      +            "properties": {
      +              "chargedPoints": {
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              "estimatedMaxPoints": {
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              "netChargedPoints": {
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              "quotedMaxPoints": {
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              "refundedPoints": {
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              "status": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "status"
      +            ],
      +            "type": "object"
      +          },
      +          "status": {
      +            "description": "Current task state, including running and terminal success, failure or cancellation.",
      +            "type": "string"
      +          },
      +          "taskId": {
      +            "description": "Existing owned task ID.",
      +            "type": "string"
      +          },
      +          "timing": {
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "taskId",
      +          "status"
      +        ],
      +        "type": "object"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "unsubmittedImages": {
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "complete",
      +    "succeeded",
      +    "failed",
      +    "submissionComplete",
      +    "imageProgress",
      +    "tasks"
      +  ],
      +  "type": "object"
      +}
  2. Changed7 schema fields changed
    • addedInput schema / properties / batchId / description
      Added value: +"Original batch receipt; choose exactly one of batchId, requestId or taskIds."
    • changedInput schema / properties / cursor / description
      Previous value: -"Copy nextAction; omit to replay images."New value: +"Opaque nextAction continuation cursor; copy unchanged. Omit only to replay already delivered images."
    • addedInput schema / properties / deliveryMode / description
      Added value: +"native returns previews and original links; links returns original links; metadata omits image delivery."
    • addedInput schema / properties / requestId / description
      Added value: +"Original single-image preview receipt; alternative to batchId or taskIds."
    • addedInput schema / properties / taskIds / description
      Added value: +"Explicit task IDs; alternative to batchId or requestId."
    • addedInput schema / properties / taskIds / items / description
      Added value: +"Owned generation task ID."
    • addedInput schema / properties / timeoutSeconds / description
      Added value: +"Bounded server wait; default 24 seconds, maximum 45. A pending response is not a failed task."
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Despite annotations already marking it read-only and idempotent, the description adds substantial behavioral detail: timeout bounds, delivery-mode preview counts, pending versus failed semantics, expiration snapshots, continuation behavior, and tool-error behavior for invalid or unauthorized lookups.

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 purpose and timeout facts are front-loaded, but the paragraph is dense and repeats failure semantics: pending is not failure, failed tasks carry error/settlement, and failed tasks remain with error/failure and settlement. Some tightening would improve it.

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?

For a complex wait/continuation tool, the description covers the important operational cases: bounded waiting, continuation via nextAction, pending versus failed states, expiration behavior, and invalid lookup errors. An output schema exists, so return-field enumeration is supplementary rather than necessary.

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. The description still adds meaning beyond the schema by explaining delivery-mode differences such as 6 native previews versus 32 original links, and by framing cursor as a nextAction continuation value.

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: wait for existing requestId, batchId, or taskIds, and explicitly says it never submits a new generation. It distinguishes the tool from generation and cancellation siblings.

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?

It clearly directs the agent to await existing receipts and not submit new generation, and it names generation_status for one-task cancellation. However, it does not fully explain when to choose wait_images versus generation_status beyond the cancellation case.

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.

Resources