# Panel Versions Tool

`panel_versions` lists a panel's versions, newest first, with the id of the one people see.

## When to Use

The agent uses it to find a version to roll back to with `panel_switch`, a staged version written with `switch: false`, or a version to read with `panel_get`.

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `panel` | string | Yes | The panel's id |

## Returns

| Field | Type | Description |
|-----------|------|-------------|
| `current_version` | string or null | The id of the version people see |
| `count` | integer | How many versions are listed |
| `versions` | array | Each version, newest first: `id`, `created_at`, `main` (its main asset's name), `files` (how many assets it lists) and `bytes` (their total size) |

## Example Scenario

```json
{ "panel": "01JC4Z8Q2V6M3K9T1R5X7B0N4D" }
```

## Notes

- Versions never change once written, and one leaves only with its panel. Switching to another makes it current and leaves the rest as they are
- A panel the workspace does not have is refused: `No panel has the id <id>`
- Risk: read
