MCP Tool: get_workflow_executions

Retrieves all executions/instances of a specific workflow with optional filtering by status and date range. This tool provides detailed information about workflow execution history and current status.

Example Prompt

Get all executions for workflow "ticket-escalation-workflow" with status "COMPLETED"

Input Parameters

NameTypeRequiredDescription
workflowIdstringYesThe unique identifier of the workflow
versionnumberNoThe version of the workflow
statusstringNoThe status of the workflow execution
fromstringNoThe start date from which to fetch executions (in ISO format)
tostringNoThe end date to which to fetch executions (in ISO format)

Response Fields

Below are the fields you may see in each workflow execution object in the response:
FieldTypeDescription
idstringThe identifier of the workflow instance
workflowIdstringThe identifier of the workflow
versionnumberThe version of the workflow
statusstringThe status of the workflow instance
contextobjectThe context of the workflow instance
startedAtstring (ISO8601)The start date of the workflow instance
lastUpdatedAtstring (ISO8601)The last updated date of the workflow instance

Sample Response

{
  "data": [
    {
      "id": "EXECUTION001",
      "workflowId": "ticket-escalation-workflow",
      "version": 1,
      "status": "COMPLETED",
      "context": {
        "ticketId": "TICKET123",
        "priority": "high",
        "team": "support",
        "triggeredBy": "ticket.created",
        "executionId": "EXECUTION001"
      },
      "startedAt": "2025-07-24T10:00:00.000Z",
      "lastUpdatedAt": "2025-07-24T10:05:30.000Z"
    },
    {
      "id": "EXECUTION002",
      "workflowId": "ticket-escalation-workflow",
      "version": 1,
      "status": "RUNNING",
      "context": {
        "ticketId": "TICKET124",
        "priority": "high",
        "team": "support",
        "triggeredBy": "ticket.created",
        "executionId": "EXECUTION002",
        "currentStep": 2,
        "stepStatus": "IN_PROGRESS"
      },
      "startedAt": "2025-07-24T11:15:00.000Z",
      "lastUpdatedAt": "2025-07-24T11:16:45.000Z"
    },
    {
      "id": "EXECUTION003",
      "workflowId": "ticket-escalation-workflow",
      "version": 1,
      "status": "FAILED",
      "context": {
        "ticketId": "TICKET125",
        "priority": "high",
        "team": "support",
        "triggeredBy": "ticket.created",
        "executionId": "EXECUTION003",
        "error": "Activity assignment.activity failed after 3 retry attempts",
        "failedStep": 2,
        "errorDetails": {
          "code": "ACTIVITY_FAILURE",
          "message": "No available agents with required skills",
          "timestamp": "2025-07-24T09:30:15.000Z"
        }
      },
      "startedAt": "2025-07-24T09:25:00.000Z",
      "lastUpdatedAt": "2025-07-24T09:30:15.000Z"
    }
  ],
  "status": true,
  "message": "Workflow executions retrieved successfully!",
  "timestamp": "2025-07-25T12:50:38.937Z"
}