> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# queue-management

> Queue and batch management: create, configure, and monitor queues for concurrent automation execution, add batch items from CSV, and track batch progress

**Server path:** `/queue-management` | **Type:** Embedded | **PCID required:** No

## Tools

| Tool                                                                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`queue-management_create_queue`](#queue-management_create_queue)         | Create a new queue for managing concurrent execution of automation runs. Configure concurrency limits, retry policies, and priority.                                                                                                                                                                                                                                                                                                         |
| [`queue-management_list_queues`](#queue-management_list_queues)           | List all queues in the current organization. Returns queue details including status, concurrency limits, and priority.                                                                                                                                                                                                                                                                                                                       |
| [`queue-management_get_queue`](#queue-management_get_queue)               | Get details for a specific queue by ID, including its configuration, status, and access control.                                                                                                                                                                                                                                                                                                                                             |
| [`queue-management_update_queue`](#queue-management_update_queue)         | Update queue configuration (name, description, concurrency limit, max retries, priority). Requires the current version number for optimistic locking.                                                                                                                                                                                                                                                                                        |
| [`queue-management_delete_queue`](#queue-management_delete_queue)         | Delete a queue and all its items. This action is destructive and cannot be undone.                                                                                                                                                                                                                                                                                                                                                           |
| [`queue-management_start_queue`](#queue-management_start_queue)           | Start processing a paused queue. The queue will begin executing pending runs up to its concurrency limit.                                                                                                                                                                                                                                                                                                                                    |
| [`queue-management_pause_queue`](#queue-management_pause_queue)           | Pause a running queue. In-progress runs will complete, but no new runs will start.                                                                                                                                                                                                                                                                                                                                                           |
| [`queue-management_get_queue_stats`](#queue-management_get_queue_stats)   | Get statistics for a queue including pending and running item counts. Optionally filter by date range.                                                                                                                                                                                                                                                                                                                                       |
| [`queue-management_get_queue_runs`](#queue-management_get_queue_runs)     | List runs for a specific queue. Returns run details including status, timestamps, and results.                                                                                                                                                                                                                                                                                                                                               |
| [`queue-management_create_batch`](#queue-management_create_batch)         | Create a new batch in a queue from a CSV file. Each row becomes a run executed via the specified trigger. Before calling, ASK THE USER which existing queue and which existing trigger on the target workflow to use — do not auto-create a queue or trigger, and do not scaffold list/find/create logic around them unless the user explicitly asks. Optionally configure a completion action (trigger or webhook) when the batch finishes. |
| [`queue-management_get_batch_status`](#queue-management_get_batch_status) | Get the status of a batch including run counts (requested, complete, failed, timed out) and overall status (pending, running, complete, canceled).                                                                                                                                                                                                                                                                                           |
| [`queue-management_list_batches`](#queue-management_list_batches)         | List all non-deleted batches for a queue. Returns batch records with id, name, status, and counters (runsRequested, runsComplete, runsFailed, runsTimeout, archived).                                                                                                                                                                                                                                                                        |
| [`queue-management_stop_batch`](#queue-management_stop_batch)             | Stop a batch: cancels the batch and its pending runs. Already-running runs are left to finish naturally. Idempotent — calling on a terminal batch is a no-op.                                                                                                                                                                                                                                                                                |
| [`queue-management_delete_batch`](#queue-management_delete_batch)         | Delete a batch (soft-delete). If the batch is still active, it is stopped first, then removed from the visible list. Use stop\_batch if you want to keep the historical batch record visible.                                                                                                                                                                                                                                                |
| [`queue-management_archive_batch`](#queue-management_archive_batch)       | Set the archived flag on a batch. Idempotent. Archived batches stay queryable but are hidden from the default list. Pass archived=false to unarchive.                                                                                                                                                                                                                                                                                        |

***

## queue-management\_create\_queue

Create a new queue for managing concurrent execution of automation runs. Configure concurrency limits, retry policies, and priority.

**Parameters:**

| Parameter          | Type   | Required | Default | Description                                      |
| ------------------ | ------ | -------- | ------- | ------------------------------------------------ |
| `name`             | string | Yes      | —       | Name for the queue                               |
| `description`      | string | No       | —       | Description of the queue purpose                 |
| `concurrencyLimit` | number | Yes      | —       | Maximum number of concurrent runs (must be >= 1) |
| `maxRetries`       | number | No       | `0`     | Maximum retry attempts for failed runs (0-3)     |
| `priority`         | number | No       | `5`     | Queue priority (1=highest, 10=lowest, default=5) |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "Name for the queue"
      },
      "description": {
        "type": "string",
        "description": "Description of the queue purpose"
      },
      "concurrencyLimit": {
        "type": "number",
        "description": "Maximum number of concurrent runs (must be >= 1)"
      },
      "maxRetries": {
        "type": "number",
        "default": 0,
        "description": "Maximum retry attempts for failed runs (0-3)"
      },
      "priority": {
        "type": "number",
        "default": 5,
        "description": "Queue priority (1=highest, 10=lowest, default=5)"
      }
    },
    "required": [
      "name",
      "concurrencyLimit"
    ]
  }
  ```
</Expandable>

***

## queue-management\_list\_queues

List all queues in the current organization. Returns queue details including status, concurrency limits, and priority.

**Parameters:** None

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {}
  }
  ```
</Expandable>

***

## queue-management\_get\_queue

Get details for a specific queue by ID, including its configuration, status, and access control.

**Parameters:**

| Parameter | Type   | Required | Default | Description                 |
| --------- | ------ | -------- | ------- | --------------------------- |
| `queueId` | string | Yes      | —       | ID of the queue to retrieve |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "queueId": {
        "type": "string",
        "description": "ID of the queue to retrieve"
      }
    },
    "required": [
      "queueId"
    ]
  }
  ```
</Expandable>

***

## queue-management\_update\_queue

Update queue configuration (name, description, concurrency limit, max retries, priority). Requires the current version number for optimistic locking.

**Parameters:**

| Parameter          | Type   | Required | Default | Description                                                                           |
| ------------------ | ------ | -------- | ------- | ------------------------------------------------------------------------------------- |
| `queueId`          | string | Yes      | —       | ID of the queue to update                                                             |
| `name`             | string | No       | —       | Updated queue name                                                                    |
| `description`      | string | No       | —       | Updated queue description                                                             |
| `concurrencyLimit` | number | No       | —       | Updated maximum concurrent runs                                                       |
| `maxRetries`       | number | No       | —       | Updated maximum retry attempts (0-3)                                                  |
| `priority`         | number | No       | —       | Updated priority (1=highest, 10=lowest)                                               |
| `version`          | number | Yes      | —       | Current version number for optimistic locking (get from queue-management\_get\_queue) |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "queueId": {
        "type": "string",
        "description": "ID of the queue to update"
      },
      "name": {
        "type": "string",
        "description": "Updated queue name"
      },
      "description": {
        "type": "string",
        "description": "Updated queue description"
      },
      "concurrencyLimit": {
        "type": "number",
        "description": "Updated maximum concurrent runs"
      },
      "maxRetries": {
        "type": "number",
        "description": "Updated maximum retry attempts (0-3)"
      },
      "priority": {
        "type": "number",
        "description": "Updated priority (1=highest, 10=lowest)"
      },
      "version": {
        "type": "number",
        "description": "Current version number for optimistic locking (get from queue-management_get_queue)"
      }
    },
    "required": [
      "queueId",
      "version"
    ]
  }
  ```
</Expandable>

***

## queue-management\_delete\_queue

Delete a queue and all its items. This action is destructive and cannot be undone.

**Parameters:**

| Parameter | Type   | Required | Default | Description               |
| --------- | ------ | -------- | ------- | ------------------------- |
| `queueId` | string | Yes      | —       | ID of the queue to delete |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "queueId": {
        "type": "string",
        "description": "ID of the queue to delete"
      }
    },
    "required": [
      "queueId"
    ]
  }
  ```
</Expandable>

***

## queue-management\_start\_queue

Start processing a paused queue. The queue will begin executing pending runs up to its concurrency limit.

**Parameters:**

| Parameter | Type   | Required | Default | Description              |
| --------- | ------ | -------- | ------- | ------------------------ |
| `queueId` | string | Yes      | —       | ID of the queue to start |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "queueId": {
        "type": "string",
        "description": "ID of the queue to start"
      }
    },
    "required": [
      "queueId"
    ]
  }
  ```
</Expandable>

***

## queue-management\_pause\_queue

Pause a running queue. In-progress runs will complete, but no new runs will start.

**Parameters:**

| Parameter | Type   | Required | Default | Description              |
| --------- | ------ | -------- | ------- | ------------------------ |
| `queueId` | string | Yes      | —       | ID of the queue to pause |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "queueId": {
        "type": "string",
        "description": "ID of the queue to pause"
      }
    },
    "required": [
      "queueId"
    ]
  }
  ```
</Expandable>

***

## queue-management\_get\_queue\_stats

Get statistics for a queue including pending and running item counts. Optionally filter by date range.

**Parameters:**

| Parameter   | Type   | Required | Default | Description                                                              |
| ----------- | ------ | -------- | ------- | ------------------------------------------------------------------------ |
| `queueId`   | string | Yes      | —       | ID of the queue                                                          |
| `startDate` | string | No       | —       | Filter stats from this date (ISO 8601 format, e.g. 2024-01-01T00:00:00Z) |
| `endDate`   | string | No       | —       | Filter stats until this date (ISO 8601 format)                           |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "queueId": {
        "type": "string",
        "description": "ID of the queue"
      },
      "startDate": {
        "type": "string",
        "description": "Filter stats from this date (ISO 8601 format, e.g. 2024-01-01T00:00:00Z)"
      },
      "endDate": {
        "type": "string",
        "description": "Filter stats until this date (ISO 8601 format)"
      }
    },
    "required": [
      "queueId"
    ]
  }
  ```
</Expandable>

***

## queue-management\_get\_queue\_runs

List runs for a specific queue. Returns run details including status, timestamps, and results.

**Parameters:**

| Parameter | Type   | Required | Default | Description                                                   |
| --------- | ------ | -------- | ------- | ------------------------------------------------------------- |
| `queueId` | string | Yes      | —       | ID of the queue                                               |
| `limit`   | number | No       | `50`    | Maximum number of runs to return (default: 50)                |
| `status`  | string | No       | —       | Filter runs by status (e.g. RUNNING, COMPLETE, FAILED, ERROR) |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "queueId": {
        "type": "string",
        "description": "ID of the queue"
      },
      "limit": {
        "type": "number",
        "default": 50,
        "description": "Maximum number of runs to return (default: 50)"
      },
      "status": {
        "type": "string",
        "description": "Filter runs by status (e.g. RUNNING, COMPLETE, FAILED, ERROR)"
      }
    },
    "required": [
      "queueId"
    ]
  }
  ```
</Expandable>

***

## queue-management\_create\_batch

Create a new batch in a queue from a CSV file. Each row becomes a run executed via the specified trigger. Before calling, ASK THE USER which existing queue and which existing trigger on the target workflow to use — do not auto-create a queue or trigger, and do not scaffold list/find/create logic around them unless the user explicitly asks. Optionally configure a completion action (trigger or webhook) when the batch finishes.

**Parameters:**

| Parameter          | Type   | Required | Default | Description                                                                                                                                                                                    |
| ------------------ | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `queueId`          | string | Yes      | —       | ID of an EXISTING queue to add items to. Ask the user for this; do not create a new queue unless explicitly requested.                                                                         |
| `triggerId`        | string | Yes      | —       | ID of an EXISTING trigger on the target workflow to execute for each queue item. Ask the user or list the target workflow's triggers; do not create a new trigger unless explicitly requested. |
| `name`             | string | No       | —       | Optional display name for the batch                                                                                                                                                            |
| `csvUrl`           | string | No       | —       | URL to a CSV file (provide either csvUrl or csvData)                                                                                                                                           |
| `csvData`          | string | No       | —       | Inline CSV data as a string (provide either csvUrl or csvData)                                                                                                                                 |
| `batchSize`        | number | No       | —       | Number of rows per batch (0 or 1 = individual rows, >1 = batch mode)                                                                                                                           |
| `onDoneTriggerId`  | string | No       | —       | Trigger ID to execute when the batch completes                                                                                                                                                 |
| `onDoneWebhookUrl` | string | No       | —       | Webhook URL to call when the batch completes                                                                                                                                                   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "queueId": {
        "type": "string",
        "description": "ID of an EXISTING queue to add items to. Ask the user for this; do not create a new queue unless explicitly requested."
      },
      "triggerId": {
        "type": "string",
        "description": "ID of an EXISTING trigger on the target workflow to execute for each queue item. Ask the user or list the target workflow's triggers; do not create a new trigger unless explicitly requested."
      },
      "name": {
        "type": "string",
        "description": "Optional display name for the batch"
      },
      "csvUrl": {
        "type": "string",
        "description": "URL to a CSV file (provide either csvUrl or csvData)"
      },
      "csvData": {
        "type": "string",
        "description": "Inline CSV data as a string (provide either csvUrl or csvData)"
      },
      "batchSize": {
        "type": "number",
        "description": "Number of rows per batch (0 or 1 = individual rows, >1 = batch mode)"
      },
      "onDoneTriggerId": {
        "type": "string",
        "description": "Trigger ID to execute when the batch completes"
      },
      "onDoneWebhookUrl": {
        "type": "string",
        "description": "Webhook URL to call when the batch completes"
      }
    },
    "required": [
      "queueId",
      "triggerId"
    ]
  }
  ```
</Expandable>

***

## queue-management\_get\_batch\_status

Get the status of a batch including run counts (requested, complete, failed, timed out) and overall status (pending, running, complete, canceled).

**Parameters:**

| Parameter | Type   | Required | Default | Description              |
| --------- | ------ | -------- | ------- | ------------------------ |
| `queueId` | string | Yes      | —       | ID of the queue          |
| `batchId` | string | Yes      | —       | ID of the batch to check |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "queueId": {
        "type": "string",
        "description": "ID of the queue"
      },
      "batchId": {
        "type": "string",
        "description": "ID of the batch to check"
      }
    },
    "required": [
      "queueId",
      "batchId"
    ]
  }
  ```
</Expandable>

***

## queue-management\_list\_batches

List all non-deleted batches for a queue. Returns batch records with id, name, status, and counters (runsRequested, runsComplete, runsFailed, runsTimeout, archived).

**Parameters:**

| Parameter | Type   | Required | Default | Description     |
| --------- | ------ | -------- | ------- | --------------- |
| `queueId` | string | Yes      | —       | ID of the queue |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "queueId": {
        "type": "string",
        "description": "ID of the queue"
      }
    },
    "required": [
      "queueId"
    ]
  }
  ```
</Expandable>

***

## queue-management\_stop\_batch

Stop a batch: cancels the batch and its pending runs. Already-running runs are left to finish naturally. Idempotent — calling on a terminal batch is a no-op.

**Parameters:**

| Parameter | Type   | Required | Default | Description                          |
| --------- | ------ | -------- | ------- | ------------------------------------ |
| `queueId` | string | Yes      | —       | ID of the queue containing the batch |
| `batchId` | string | Yes      | —       | ID of the batch to stop              |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "queueId": {
        "type": "string",
        "description": "ID of the queue containing the batch"
      },
      "batchId": {
        "type": "string",
        "description": "ID of the batch to stop"
      }
    },
    "required": [
      "queueId",
      "batchId"
    ]
  }
  ```
</Expandable>

***

## queue-management\_delete\_batch

Delete a batch (soft-delete). If the batch is still active, it is stopped first, then removed from the visible list. Use stop\_batch if you want to keep the historical batch record visible.

**Parameters:**

| Parameter | Type   | Required | Default | Description                          |
| --------- | ------ | -------- | ------- | ------------------------------------ |
| `queueId` | string | Yes      | —       | ID of the queue containing the batch |
| `batchId` | string | Yes      | —       | ID of the batch to delete            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "queueId": {
        "type": "string",
        "description": "ID of the queue containing the batch"
      },
      "batchId": {
        "type": "string",
        "description": "ID of the batch to delete"
      }
    },
    "required": [
      "queueId",
      "batchId"
    ]
  }
  ```
</Expandable>

***

## queue-management\_archive\_batch

Set the archived flag on a batch. Idempotent. Archived batches stay queryable but are hidden from the default list. Pass archived=false to unarchive.

**Parameters:**

| Parameter  | Type    | Required | Default | Description                             |
| ---------- | ------- | -------- | ------- | --------------------------------------- |
| `queueId`  | string  | Yes      | —       | ID of the queue containing the batch    |
| `batchId`  | string  | Yes      | —       | ID of the batch to archive or unarchive |
| `archived` | boolean | Yes      | —       | true to archive, false to unarchive     |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "queueId": {
        "type": "string",
        "description": "ID of the queue containing the batch"
      },
      "batchId": {
        "type": "string",
        "description": "ID of the batch to archive or unarchive"
      },
      "archived": {
        "type": "boolean",
        "description": "true to archive, false to unarchive"
      }
    },
    "required": [
      "queueId",
      "batchId",
      "archived"
    ]
  }
  ```
</Expandable>
