Skip to main content
Glama
This connector has been deprecated

Replaced by io.github.no-fait/infinite-audience

Wait For Delivery

wait_for_delivery
Read-onlyIdempotent

Block until a delivery completes or fails. Call this immediately after deliver_audience or deliver_file_match when the response has status: "processing". Polls GET /v1/audiences/{audience_id}/deliveries/{delivery_id} every 15 seconds. On success returns the full delivery object including download_urls[] — share these directly with the user. Each signed link is valid for 24 hours; expires_at is the delivery artifact retention date, not the link expiry. Call get_delivery for a fresh link while the artifact remains available. Throws DELIVERY_FAILED if the export failed (check failure_reason), or DELIVERY_TIMEOUT if it did not finish within timeout_seconds (default 30 seconds). A wait timeout does not cancel or fail the job; use the corresponding get tool to check it again. Requires 'discovery' scope.

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": {
      "audience_id": "<audience_id>",
      "delivery_id": "<delivery_id>"
    },
    "name": "wait_for_delivery"
  }
}

Input Schema

NameRequiredDescriptionDefault
audience_idYesAudience ID returned by the delivery or file-match job; do not assume it equals match_id or segment_id
delivery_idYesDelivery ID returned by deliver_audience or deliver_file_match
timeout_secondsNoMaximum seconds to wait (default 30). Prefer get_delivery for a single status check; a wait timeout is not an export failure.

Output Schema

NameRequiredDescriptionDefault
statusYesCurrent delivery state
guidanceNoInterpretation or recovery guidance for this result
count_unitNo
page_countNoNumber of objects on this page, not the organization total
count_stateNoUnknown means no count; available does not guarantee freshness. Recount for a current value.
next_actionsNoSuggested next calls using returned IDs and available scopes. Not executed and not user consent.
download_urlsNoFresh signed artifact URLs on an individual completed download delivery
population_inputNoPopulation input used for the preview; IDs refer to their current saved definitions

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / audience_id / description
      Previous value: -"Audience ID the delivery belongs to (same as match_id for matched audiences)"New value: +"Audience ID returned by the delivery or file-match job; do not assume it equals match_id or segment_id"
    • changedInput schema / properties / timeout_seconds / default
      Previous value: -900New value: +30
    • changedInput schema / properties / timeout_seconds / description
      Previous value: -"Maximum seconds to wait. Default 900 (15 min)."New value: +"Maximum seconds to wait (default 30). Prefer get_delivery for a single status check; a wait timeout is not an export failure."
    • changedInput schema / properties / timeout_seconds / minimum
      Previous value: -30New value: +1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "count_state": {
      +      "description": "Unknown means no count; available does not guarantee freshness. Recount for a current value.",
      +      "enum": [
      +        "unknown",
      +        "available"
      +      ],
      +      "type": "string"
      +    },
      +    "count_unit": {
      +      "const": "records",
      +      "type": "string"
      +    },
      +    "download_urls": {
      +      "description": "Fresh signed artifact URLs on an individual completed download delivery",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "guidance": {
      +      "description": "Interpretation or recovery guidance for this result",
      +      "type": "string"
      +    },
      +    "next_actions": {
      +      "description": "Suggested next calls using returned IDs and available scopes. Not executed and not user consent.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "arguments": {
      +            "additionalProperties": {},
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "reason": {
      +            "type": "string"
      +          },
      +          "tool": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "tool",
      +          "arguments",
      +          "reason"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "page_count": {
      +      "description": "Number of objects on this page, not the organization total",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "population_input": {
      +      "additionalProperties": {},
      +      "description": "Population input used for the preview; IDs refer to their current saved definitions",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "status": {
      +      "description": "Current delivery state",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: discloses the 15-second polling cadence, the two error conditions (DELIVERY_FAILED with failure_reason, DELIVERY_TIMEOUT), and critically that a wait timeout neither cancels nor fails the job. It also flags the required 'discovery' scope and clarifies that expires_at is artifact retention, not link expiry — non-obvious details an agent would otherwise get wrong.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and the trigger condition, then layered with error and link-lifetime details in a sensible order. Dense with operational facts, though the timeout-semantics point is stated twice (in the body and echoed by the schema), which costs a little tightness.

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 blocking/polling tool this covers everything an agent needs: prerequisites, polling behavior, error paths, post-timeout recovery, credential scope, and link lifetime. Since an output schema exists, the description need not enumerate return fields, yet it still surfaces download_urls[] and the expires_at distinction where misuse is likely.

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 documents all three parameters and the baseline would be 3. The description still adds meaning by tying timeout_seconds to the timeout-vs-failure distinction and reinforcing that a timeout leaves the job intact, which is behavioral context the schema only briefly hints at.

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?

"Block until a delivery completes or fails" states a specific verb (block/wait) and resource (delivery) with the exact scope of the operation. It is clearly distinguished from the sibling get_delivery, which is named as the non-blocking single-check alternative.

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?

Names the precise trigger (call immediately after deliver_audience or deliver_file_match when status is "processing"), names the alternative (get_delivery for a single status check), and states the follow-up action after a timeout. There is no ambiguity about when to use this tool versus its siblings.

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