Skip to main content
Glama

Wait for Image Project

wait_for_image_project
Read-onlyIdempotent

Polls an image project until it completes, errors, is canceled or times out. Use with the id returned by an image create tool. Read-only; returns the project and download URLs, with optional inline image previews sharing an 8 MiB total limit. After a timeout, resume with the same id rather than creating another generation. Use signed download URLs exactly as returned.

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": {
      "id": "<id>"
    },
    "name": "wait_for_image_project"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesExisting project ID returned by the matching creation tool. Reuse this ID after a wait timeout.
timeout_secondsNoMaximum seconds for this wait call, finite and greater than zero. Timeout does not cancel the project or start another generation.
max_inline_downloadsNoMaximum number of previews to include. Zero or negative disables previews; previews share an 8 MiB total limit.
poll_interval_secondsNoSeconds between status checks. Must be finite and nonnegative; values below 0.5 use 0.5 seconds.
max_bytes_per_downloadNoPositive maximum raw bytes per preview, capped by the remaining 8 MiB total budget. Larger outputs remain available by URL.
include_inline_downloadsNoWhether to include image or audio previews for completed projects. Download URLs remain available if preview fetching fails.

Output Schema

NameRequiredDescriptionDefault
idNoExisting project identifier, retained for subsequent status checks.
statusNoProject status such as complete, error or canceled; timeout means only this wait call ended.
messageNoWait timeout or recovery guidance, when present.
downloadsNoAvailable output files with exact signed URLs. May be absent until completion.
last_projectNoLast observed API project snapshot if the wait timed out after a successful status check.
project_typeYesKind of project being retrieved.
exact_download_urlsNoConvenience list of the same unmodified signed output URLs.
download_expiration_metadataNoExpiration metadata only. Never append it to a download URL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / id / description
      Added value: +"Existing project ID returned by the matching creation tool. Reuse this ID after a wait timeout."
    • addedInput schema / properties / include_inline_downloads / description
      Added value: +"Whether to include image or audio previews for completed projects. Download URLs remain available if preview fetching fails."
    • addedInput schema / properties / max_bytes_per_download / description
      Added value: +"Positive maximum raw bytes per preview, capped by the remaining 8 MiB total budget. Larger outputs remain available by URL."
    • addedInput schema / properties / max_inline_downloads / description
      Added value: +"Maximum number of previews to include. Zero or negative disables previews; previews share an 8 MiB total limit."
    • addedInput schema / properties / poll_interval_seconds / description
      Added value: +"Seconds between status checks. Must be finite and nonnegative; values below 0.5 use 0.5 seconds."
    • addedInput schema / properties / timeout_seconds / description
      Added value: +"Maximum seconds for this wait call, finite and greater than zero. Timeout does not cancel the project or start another generation."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Existing project status and exact output links. A wait timeout is not a generation failure; resume with the same ID.",
      +  "properties": {
      +    "download_expiration_metadata": {
      +      "description": "Expiration metadata only. Never append it to a download URL.",
      +      "items": {
      +        "properties": {
      +          "download_index": {
      +            "description": "Zero-based index in the upstream download list, encoded as text.",
      +            "type": "string"
      +          },
      +          "expires_at": {
      +            "description": "Expiration timestamp provided by the API.",
      +            "type": "string"
      +          },
      +          "note": {
      +            "description": "Guidance for preserving the signed URL.",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "downloads": {
      +      "description": "Available output files with exact signed URLs. May be absent until completion.",
      +      "items": {
      +        "properties": {
      +          "url": {
      +            "description": "Use this signed download URL unchanged, including all query parameters.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "url"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "exact_download_urls": {
      +      "description": "Convenience list of the same unmodified signed output URLs.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "id": {
      +      "description": "Existing project identifier, retained for subsequent status checks.",
      +      "type": "string"
      +    },
      +    "last_project": {
      +      "description": "Last observed API project snapshot if the wait timed out after a successful status check.",
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Wait timeout or recovery guidance, when present.",
      +      "type": "string"
      +    },
      +    "project_type": {
      +      "description": "Kind of project being retrieved.",
      +      "enum": [
      +        "image",
      +        "video",
      +        "audio"
      +      ],
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "Project status such as complete, error or canceled; timeout means only this wait call ended.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "project_type"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / max_bytes_per_download / default
      Previous value: -15728640New value: +8388608
  3. Changed1 schema field changed
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      -  "type": "string"
      -}
  4. Changed1 schema field changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      +  "type": "string"
      +}
  5. First observed

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already establish read-only, idempotent, non-destructive behavior, and the description adds useful context: the polling terminal states, the fact that timeout does not cancel the project or start a new generation, and the shared 8 MiB preview limit. It does not detail failure modes beyond noting that the project may error.

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 description is compact and front-loaded: it first explains what the tool does, then adds usage constraints, return behavior, timeout handling, and URL safety guidance. There is no redundant or filler wording.

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?

The tool has an output schema and fully described parameters, so the description does not need to explain return structures in detail. It covers the critical operational concerns for a polling tool: terminal conditions, timeout resumption, preview limits, and signed URL handling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the parameters are already well documented in the input schema. The description reinforces key semantics such as reusing the id after a timeout and the inline preview budget, but it adds little parameter-level meaning beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: it polls an image project until it completes, errors, is canceled, or times out. It also ties the tool to an id returned by an image create tool, making its role clear, though it does not explicitly distinguish itself from a single-fetch sibling such as get_image_project.

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 gives clear usage context: call it with the id from an image creation tool, and after a timeout resume with the same id rather than creating another generation. It also warns to use signed download URLs exactly as returned, though it does not explicitly state when to prefer this over an alternative status-checking tool.

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