Wait For Segment
wait_for_segmentPoll a segment until its status is "active" or "failed". Use after create_segment(subtype=matched) once the file has been uploaded AND confirm_column_mappings has succeeded — the segment will not progress past "pending" before that (the upload is staged). Do not call this before confirm_column_mappings. Custom membership is published internally; use this tool to read a pending segment publication. Polls GET /v1/segments/{segment_id} every 15 seconds; polling may synchronize an expired status onto the saved segment. On success returns the customer-facing segment details — pass segment_id in create_audience.segment_refs, then use the returned audience_id to quote_delivery and deliver_audience. Throws SEGMENT_FAILED if processing failed, or SEGMENT_TIMEOUT if it did not complete 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": {
"segment_id": "<segment_id>"
},
"name": "wait_for_segment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| segment_id | Yes | The segment ID returned by create_segment | |
| timeout_seconds | No | Maximum seconds to wait (default 30). Prefer get_segment for a single status check; a wait timeout does not stop processing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| status | Yes | ||
| subtype | Yes | ||
| guidance | No | Interpretation or recovery guidance for this result | |
| count_unit | No | ||
| page_count | No | Number of objects on this page, not the organization total | |
| segment_id | Yes | ||
| count_state | No | Unknown means no count; available does not guarantee freshness. Recount for a current value. | |
| next_actions | No | Suggested next calls using returned IDs and available scopes. Not executed and not user consent. | |
| record_count | No | Stored count; null means unknown. Call count_segment for a current count. | |
| record_limit | No | Maximum members; null means no explicit cap | |
| filter_groups | No | Complete saved filter definition; one AND group also represents a simple flat filter list | |
| current_version | No | ||
| population_input | No | Population input used for the preview; IDs refer to their current saved definitions |