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

# Get workflow

> MCP tool to retrieve a specific workflow by its unique identifier from the Thena platform.

import Admonition from '@theme/Admonition';

### MCP tool: `get_workflow`

Retrieves detailed information about a specific workflow by its unique identifier. This tool provides comprehensive workflow details including definition, configuration, and version information.

<Admonition type="note">
  You must provide the workflow unique identifier. The version parameter is optional and will retrieve the latest version if not specified.
</Admonition>

### Example prompt

```prompt theme={null}
Get workflow with unique identifier "ticket-escalation-workflow"
```

<Admonition type="info">
  When you use this prompt in a chat with the model (with the MCP tool registered), the model will automatically call the <code>get\_workflow</code> tool with the correct arguments.
</Admonition>

### Input parameters

| Name                     | Type   | Required | Description                                      |
| ------------------------ | ------ | -------- | ------------------------------------------------ |
| workflowUniqueIdentifier | string | Yes      | The unique identifier of the workflow            |
| version                  | number | No       | The version of the workflow (defaults to latest) |

### Response fields

Below are the fields you may see in the response:

<table>
  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>uid</td><td>string</td><td>Unique identifier for current version of the workflow</td></tr>
    <tr><td>type</td><td>string</td><td>The type of the workflow</td></tr>
    <tr><td>subType</td><td>string</td><td>The sub type of the workflow</td></tr>
    <tr><td>uniqueIdentifier</td><td>string</td><td>The unique identifier of the workflow</td></tr>
    <tr><td>name</td><td>string</td><td>The name identifier of the workflow</td></tr>
    <tr><td>version</td><td>number</td><td>The version of the workflow</td></tr>
    <tr><td>triggerEvent</td><td>object</td><td>The trigger event of the workflow</td></tr>
    <tr><td>filters</td><td>object</td><td>The filters of the workflow</td></tr>
    <tr><td>annotations</td><td>array</td><td>The annotation for the workflow</td></tr>
    <tr><td>workflowDefinition</td><td>array</td><td>The workflow definition steps</td></tr>
    <tr><td>executingAgent</td><td>string</td><td>The executing agent of the workflow</td></tr>
    <tr><td>isActive</td><td>boolean</td><td>The status of the workflow</td></tr>
    <tr><td>createdAt</td><td>string (ISO8601)</td><td>The created at date of the workflow</td></tr>
    <tr><td>updatedAt</td><td>string (ISO8601)</td><td>The updated at date of the workflow</td></tr>
    <tr><td>createdBy</td><td>string</td><td>The created by of the workflow</td></tr>
    <tr><td>teamId</td><td>string</td><td>The team id of the workflow</td></tr>
    <tr><td>metadata</td><td>object</td><td>The metadata for the workflow</td></tr>
  </tbody>
</table>

### Sample response

```json theme={null}
{
  "data": {
    "uid": "WORKFLOW001",
    "type": "WORKFLOW",
    "subType": "AI_AGENT",
    "uniqueIdentifier": "ticket-escalation-workflow",
    "name": "Ticket Escalation Workflow",
    "version": 1,
    "triggerEvent": {
      "id": "EVENT001",
      "name": "ticket.created",
      "description": "Triggered when a new ticket is created",
      "schema": {
        "type": "object",
        "properties": {
          "ticketId": { "type": "string" },
          "priority": { "type": "string" },
          "team": { "type": "string" }
        }
      }
    },
    "filters": {
      "priority": "high",
      "team": "support",
      "autoEscalate": true
    },
    "annotations": [
      {
        "entityType": "ticket",
        "data": {
          "autoEscalate": true,
          "escalationThreshold": 30
        },
        "relations": ["escalation", "notification"]
      }
    ],
    "workflowDefinition": [
      {
        "stepIdentifier": 1,
        "activity": {
          "name": "send-notification",
          "uniqueIdentifier": "notification.activity",
          "version": 1,
          "autoUpgradeToLatestVersion": true
        },
        "input": {
          "recipients": ["support-team", "senior-agents"],
          "message": "High priority ticket requires immediate attention",
          "priority": "urgent"
        },
        "retryPolicy": {
          "maximumAttempts": 3,
          "initialInterval": 1000,
          "backoffCoefficient": 2
        },
        "onFailure": "CONTINUE",
        "isSleepActivity": false,
        "executionTimeout": 30000,
        "dependencies": [],
        "filters": {
          "notificationType": "escalation"
        }
      },
      {
        "stepIdentifier": 2,
        "activity": {
          "name": "assign-to-senior-agent",
          "uniqueIdentifier": "assignment.activity",
          "version": 1,
          "autoUpgradeToLatestVersion": true
        },
        "input": {
          "priority": "high",
          "skillSet": ["escalation", "technical", "senior"],
          "autoAssign": true
        },
        "retryPolicy": {
          "maximumAttempts": 2,
          "initialInterval": 5000,
          "backoffCoefficient": 1.5
        },
        "onFailure": "ABORT",
        "isSleepActivity": false,
        "executionTimeout": 60000,
        "dependencies": [1],
        "filters": {
          "agentLevel": "senior"
        }
      },
      {
        "stepIdentifier": 3,
        "activity": {
          "name": "update-ticket-status",
          "uniqueIdentifier": "status-update.activity",
          "version": 1,
          "autoUpgradeToLatestVersion": true
        },
        "input": {
          "status": "escalated",
          "comment": "Automatically escalated due to high priority"
        },
        "retryPolicy": {
          "maximumAttempts": 1,
          "initialInterval": 1000,
          "backoffCoefficient": 1
        },
        "onFailure": "CONTINUE",
        "isSleepActivity": false,
        "executionTimeout": 15000,
        "dependencies": [2],
        "filters": {}
      }
    ],
    "executingAgent": "workflow-engine",
    "isActive": true,
    "createdAt": "2025-07-24T07:19:10.258Z",
    "updatedAt": "2025-07-24T07:19:10.258Z",
    "createdBy": "USER001",
    "teamId": "TEAM001",
    "metadata": {
      "description": "Automated workflow for escalating high-priority tickets",
      "tags": ["escalation", "automation", "support"],
      "category": "customer-service",
      "priority": "high"
    }
  },
  "status": true,
  "message": "Workflow retrieved successfully!",
  "timestamp": "2025-07-25T12:50:38.937Z"
}
```

<Admonition type="tip">
  Always pass an object as input, even if empty, to avoid errors when calling the tool directly.
</Admonition>

***
