# move_window

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

> Change tmux state; no client-supplied executable input. Move a window to another index, or into another session. With replaceExisting it takes an index that is already occupied by killing the window there, which needs the teardown toolset.

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. Move a window to another index, or into another session. With replaceExisting it takes an index that is already occupied by killing the window there, which needs the teardown toolset.

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

## Arguments

* `destination` optional · string

  The destination window index. Omit for the next free index, as an empty one does.

  Default: `""`.

* `replaceExisting` optional · boolean

  Kill the window already at that index and take its place. Needs the same authority as kill_window, because that is what it does to it.

  Default: `false`.

* `session` optional · string | null

  The destination session id or name. Omit to stay in the window's session.

  Default: `null`.

* `windowId` required · string

  The window id to move.

## Schemas

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

Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "destination": {
      "default": "",
      "description": "The destination window index. Omit for the next free index, as an empty one does.",
      "type": "string"
    },
    "replaceExisting": {
      "default": false,
      "description": "Kill the window already at that index and take its place. Needs the same authority as kill_window, because that is what it does to it.",
      "type": "boolean"
    },
    "session": {
      "default": null,
      "description": "The destination session id or name. Omit to stay in the window's session.",
      "type": [
        "string",
        "null"
      ]
    },
    "windowId": {
      "description": "The window id to move.",
      "type": "string"
    }
  },
  "required": [
    "windowId"
  ],
  "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": "Move window"
}
```
