# Workflows

> MCP tools for the Workflows module. See the [Workflows module docs](/docs/modules/workflows) for permissions and data model.

# Workflows

MCP tools for the Workflows module. See the [Workflows module docs](/docs/modules/workflows) for permissions and data model.

### `list-workflows`

List workflows

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `project_id` | `string` | no | — |
| `limit` | `number` | no | Maximum number of results to return |
| `offset` | `number` | no | Number of results to skip |

### `create-workflow`

Create a workflow

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `project_id` | `string` | no | — |
| `name` | `string` | yes | — |
| `description` | `string \| null` | no | — |
| `states` | `array<object>` | yes | — |
| `transitions` | `array<object>` | yes | — |
| `payload_schema` | `object \| null` | no | — |
| `version_label` | `string` | no | Optional tag for the version this create archives, e.g. `initial`. |

### `get-workflow`

Get a workflow

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `workflow_id` | `string` | yes | — |

### `update-workflow`

Update a workflow

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `workflow_id` | `string` | yes | — |
| `name` | `string` | no | — |
| `description` | `string \| null` | no | — |
| `states` | `array<object>` | no | — |
| `transitions` | `array<object>` | no | — |
| `payload_schema` | `object \| null` | no | — |
| `version_label` | `string` | no | Optional tag for the version this write archives, e.g. `pre-rewire`. Ignored when the write changes no definition field, since no version is archived. |

### `delete-workflow`

Delete a workflow

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `workflow_id` | `string` | yes | — |

### `list-workflow-versions`

List a workflow's versions

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `workflow_id` | `string` | yes | — |
| `limit` | `number` | no | Maximum number of results to return |
| `offset` | `number` | no | Number of results to skip |

### `get-workflow-version`

Fetch an archived workflow version

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `workflow_id` | `string` | yes | — |
| `version` | `number` | yes | The archived version number |

### `restore-workflow-version`

Restore an archived workflow state machine

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `workflow_id` | `string` | yes | — |
| `version` | `number` | yes | The archived version number |
| `label` | `string` | no | Optional tag for the new version the restore archives. Defaults to `restored from vN`. |
