MCP Tool: get_workflow_tasks

Retrieves all tasks/activities within a specific workflow execution by its instance ID. This tool provides detailed information about individual workflow steps, their execution status, and results.

Example Prompt

Get all tasks for workflow execution "EXECUTION001"

Input Parameters

NameTypeRequiredDescription
workflowInstanceIdstringYesThe instance ID of the workflow execution

Response Fields

Below are the fields you may see in each workflow task object in the response:
FieldTypeDescription
idstringThe identifier of the activity of a workflow instance
stepIdentifiernumberThe step identifier of the activity as present in workflow definition
activitystringThe activity of the workflow instance
statusstringThe status of the activity of a workflow instance
inputobjectThe input of the activity of a workflow instance
resultobjectThe result of the activity of a workflow instance
isRetrybooleanIf the activity is a retry
isCompensationbooleanIf the activity is a compensation
executionTimenumberThe execution time of the activity (in seconds)
startedAtstring (ISO8601)The start date of the activity
lastUpdatedAtstring (ISO8601)The last updated date of the activity

Sample Response

{
  "data": [
    {
      "id": "TASK001",
      "stepIdentifier": 1,
      "activity": "send-notification",
      "status": "COMPLETED",
      "input": {
        "recipients": ["support-team"],
        "message": "High priority ticket requires immediate attention",
        "priority": "urgent"
      },
      "result": {
        "notificationId": "NOTIF001",
        "sentTo": ["support-team"],
        "deliveryStatus": "delivered",
        "timestamp": "2025-07-24T10:00:15.000Z"
      },
      "isRetry": false,
      "isCompensation": false,
      "executionTime": 2.5,
      "startedAt": "2025-07-24T10:00:12.000Z",
      "lastUpdatedAt": "2025-07-24T10:00:15.000Z"
    },
    {
      "id": "TASK002",
      "stepIdentifier": 2,
      "activity": "assign-to-senior-agent",
      "status": "RUNNING",
      "input": {
        "priority": "high",
        "skillSet": ["escalation", "technical"],
        "autoAssign": true
      },
      "result": {
        "agentSearchInProgress": true,
        "candidatesFound": 3,
        "currentStep": "evaluating_availability"
      },
      "isRetry": false,
      "isCompensation": false,
      "executionTime": 45.2,
      "startedAt": "2025-07-24T10:00:16.000Z",
      "lastUpdatedAt": "2025-07-24T10:01:01.000Z"
    },
    {
      "id": "TASK003",
      "stepIdentifier": 2,
      "activity": "assign-to-senior-agent",
      "status": "FAILED",
      "input": {
        "priority": "high",
        "skillSet": ["escalation", "technical"],
        "autoAssign": true
      },
      "result": {
        "error": "No available agents with required skills",
        "attemptsMade": 3,
        "lastAttempt": "2025-07-24T10:01:30.000Z"
      },
      "isRetry": true,
      "isCompensation": false,
      "executionTime": 120.0,
      "startedAt": "2025-07-24T10:01:02.000Z",
      "lastUpdatedAt": "2025-07-24T10:03:02.000Z"
    },
    {
      "id": "TASK004",
      "stepIdentifier": 3,
      "activity": "update-ticket-status",
      "status": "PENDING",
      "input": {
        "status": "escalated",
        "comment": "Automatically escalated due to high priority"
      },
      "result": null,
      "isRetry": false,
      "isCompensation": false,
      "executionTime": 0,
      "startedAt": null,
      "lastUpdatedAt": "2025-07-24T10:00:16.000Z"
    }
  ],
  "status": true,
  "message": "Workflow tasks retrieved successfully!",
  "timestamp": "2025-07-25T12:50:38.937Z"
}