# versions

> Reference for the versions tool: commit, branch, checkout, merge and tag prompts, workflows and agents.

Source: https://prompt-verse.io/docs/reference/versions/

The versions tool gives prompts, workflows and agents a history. Every action takes an entity_type (prompt, workflow or agent) and an entity_id.

Call it as `geenius_promptverse(tool: "versions", action: "<action>", args: {...})` through Geenius OS, or as the `versions` tool of the Prompt Verse MCP server with `action` and `args`.

## Actions

| Action | What it does |
|---|---|
| `commit` | Commit the working copy with a message. Returns the commit id. |
| `commits` | Commits, newest first. |
| `branch` | Create a branch. Give from_commit_id and checkout to restore an older version. |
| `branches` | The branches of the asset. |
| `checkout` | Switch to a branch. |
| `current` | The branch the asset is on. |
| `merge` | Merge a branch into the current one. Conflicts come back so you can resolve them. |
| `tag` | Name a commit as a tag or a release. |
| `tags` | The tags and releases of the asset. |

## Arguments we have checked

### versions · commit

Commit the working copy with a message. Returns the commit id.

- `entity_type` (required): prompt, workflow or agent.
- `entity_id` (required): Its id.
- `message` (required): What changed.

### versions · commits

Commits, newest first.

- `entity_type` (required): prompt, workflow or agent.
- `entity_id` (required): Its id.

### versions · branch

Create a branch. Give from_commit_id and checkout to restore an older version.

- `entity_type` (required): prompt, workflow or agent.
- `entity_id` (required): Its id.
- `name` (required): Branch name.
- `from_commit_id`: Where to start.
- `checkout`: Switch to the new branch at once.

### versions · branches

The branches of the asset.

- `entity_type` (required): prompt, workflow or agent.
- `entity_id` (required): Its id.

### versions · checkout

Switch to a branch.

- `entity_type` (required): prompt, workflow or agent.
- `entity_id` (required): Its id.
- `branch_id` (required): Branch id.

### versions · current

The branch the asset is on.

- `entity_type` (required): prompt, workflow or agent.
- `entity_id` (required): Its id.

### versions · merge

Merge a branch into the current one. Conflicts come back so you can resolve them.

- `entity_type` (required): prompt, workflow or agent.
- `entity_id` (required): Its id.
- `source_branch_id` (required): The branch to merge in.
- `resolutions`: An object that maps each conflict key to ours or theirs.

### versions · tag

Name a commit as a tag or a release.

- `entity_type` (required): prompt, workflow or agent.
- `entity_id` (required): Its id.
- `commit_id` (required): Commit id.
- `name` (required): For example v1.0.
- `kind`: release or tag.
- `notes`: Optional notes.

### versions · tags

The tags and releases of the asset.

- `entity_type` (required): prompt, workflow or agent.
- `entity_id` (required): Its id.

> [!TIP]
> Ask for the exact arguments of any action with `action: "help", of: "commit"`. The server answers from its own definitions, so that answer is always current.

