# swap_pane

Source: https://libtmux.org/en/csharp/latest/mcp/tools/swap_pane/

> Change tmux state; no client-supplied executable input. Swap two panes' positions; each keeps its program, its content and its ID.

MCP is in development

Server behavior and tool contracts may change. Tool availability depends on the server configuration.

Change tmux state; no client-supplied executable input. Swap two panes’ positions; each keeps its program, its content and its ID.

[All C# tools](https://libtmux.org/en/csharp/latest/mcp/tools/) · [JSON](https://libtmux.org/en/csharp/latest/mcp/tools/swap_pane.json) · [Source](https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux.Mcp/Policy/CapabilityModel.cs#L596)

## Arguments

* `detach` optional · boolean

  Leave the swapped pane unselected.

  Default: `false`.

* `keepZoom` optional · boolean

  Keep zoom state.

  Default: `false`.

* `paneId` required · string

  The pane id to swap.

* `targetPaneId` required · string

  The other pane id.

## Schemas

The schema defines required fields, nested values, defaults, and validation constraints.

Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "detach": {
      "default": false,
      "description": "Leave the swapped pane unselected.",
      "type": "boolean"
    },
    "keepZoom": {
      "default": false,
      "description": "Keep zoom state.",
      "type": "boolean"
    },
    "paneId": {
      "description": "The pane id to swap.",
      "type": "string"
    },
    "targetPaneId": {
      "description": "The other pane id.",
      "type": "string"
    }
  },
  "required": [
    "paneId",
    "targetPaneId"
  ],
  "type": "object"
}
```

Output schema

```json
{
  "properties": {
    "changed": {
      "type": "string"
    },
    "paneId": {
      "default": null,
      "type": [
        "string",
        "null"
      ]
    },
    "sessionId": {
      "default": null,
      "type": [
        "string",
        "null"
      ]
    },
    "windowId": {
      "default": null,
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "changed"
  ],
  "type": "object"
}
```

Tool annotations

```json
{
  "destructiveHint": true,
  "idempotentHint": false,
  "openWorldHint": true,
  "readOnlyHint": false,
  "title": "Swap pane"
}
```
