> ## 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.

# Toggle workflow

> MCP tool to activate or deactivate a workflow in the Thena platform.

import Admonition from '@theme/Admonition';

### MCP tool: `toggle_workflow`

Activates or deactivates a workflow by toggling its active status. This tool allows you to enable or disable workflows without deleting them, providing a way to temporarily pause workflow execution.

<Admonition type="note">
  You must provide the workflow unique identifier and the desired active status (true to activate, false to deactivate).
</Admonition>

### Example prompt

```prompt theme={null}
Deactivate workflow "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>toggle\_workflow</code> tool with the correct arguments.
</Admonition>

### Input parameters

| Name                     | Type    | Required | Description                                                   |
| ------------------------ | ------- | -------- | ------------------------------------------------------------- |
| workflowUniqueIdentifier | string  | Yes      | The unique identifier of the workflow to toggle               |
| isActive                 | boolean | Yes      | Whether to activate (true) or deactivate (false) the workflow |

### Response fields

The response will be a simple success message indicating the workflow was activated or deactivated.

### Sample response

```json theme={null}
{
  "content": [
    {
      "type": "text",
      "text": "Workflow deactivated successfully"
    }
  ]
}
```

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

<Admonition type="info">
  This tool provides a safe way to pause workflow execution without losing the workflow definition. Deactivated workflows will not trigger or execute until reactivated.
</Admonition>

***
