# Restore Workflow Version Tool

`restore_workflow_version` brings back an earlier version of a workflow's graph as a new current
version.

## When to Use

The agent uses it to undo a change: an edit that broke a run, or a `push_workflow_graph` that should
not have happened. Find the version with `list_workflow_versions` first; restoring needs its id.

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `workflow_id` | string | Yes | Workflow slug or id ULID |
| `version_id` | string | Yes | The id ULID of the version to restore, from `list_workflow_versions` |

## Returns

| Field | Type | Description |
|-------|------|-------------|
| `success` | boolean | `true` when the version was restored |
| `workflow` | object | The workflow as restored: its graph, settings, and `current_data_id`, the id of the new version |
| `validation` | object | `valid`, `errors` and `warnings` for the restored graph |

## Example Scenario

A push named "Retry failed Gmail sends" made the workflow fail. The agent lists the versions, takes
the one before the push, an unnamed version from 2026-11-14, and restores it:

```json
{ "workflow_id": "invoice-intake", "version_id": "01M7HZ1C4T0B6W8D2N5Q9R3K7F" }
```

## Notes

- Any listed version can be restored, named or not. A version without a name is known by its date, and several can share one, so name it by `version_id`
- The restored graph becomes a new, unnamed version; every version before it stays listed, the one being left included
- Restoring does not move a pin; `bump_pinned_workflow_version` moves it to the restored version when external runs should use it
- Risk: write
