# select_pane

Source: https://libtmux.org/en/rs/latest/mcp/tools/select_pane/

> Select a pane, making it its window's active pane. Give a direction to move relative to it instead: up, down, left, and right follow the layout, last returns to the previously active pane, and next and previous step through the window in order. Change tmux state; no client-supplied executable input.

MCP is in development

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

Select a pane, making it its window’s active pane. Give a direction to move relative to it instead: up, down, left, and right follow the layout, last returns to the previously active pane, and next and previous step through the window in order. Change tmux state; no client-supplied executable input.

[All Rust tools](https://libtmux.org/en/rs/latest/mcp/tools/) · [JSON](https://libtmux.org/en/rs/latest/mcp/tools/select_pane.json) · [Source](https://github.com/libtmux/libtmux-rs/blob/2cef1aa642182dd1970c3688feb6a568ff666e64/crates/tmux-mcp/src/tools/control.rs#L388)

## Arguments

* `direction` optional

  Move relative to that pane instead of selecting it. \`up\`, \`down\`, \`left\`, and \`right\` follow the layout, so \`up\` selects whatever pane is drawn above. \`last\` returns to the previously active pane, and \`next\` and \`previous\` step through the window's panes in order. Omit to select the named pane itself.

* `pane` required · string

  The \`%\`-prefixed pane to select, or to move relative to.

## Schemas

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

Input schema

```json
{
  "$defs": {
    "SelectPaneDirectionSchema": {
      "enum": [
        "up",
        "down",
        "left",
        "right",
        "last",
        "next",
        "previous"
      ],
      "type": "string"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "direction": {
      "anyOf": [
        {
          "$ref": "#/$defs/SelectPaneDirectionSchema"
        },
        {
          "type": "null"
        }
      ],
      "description": "Move relative to that pane instead of selecting it.\n\n`up`, `down`, `left`, and `right` follow the layout, so `up` selects\nwhatever pane is drawn above. `last` returns to the previously active\npane, and `next` and `previous` step through the window's panes in\norder. Omit to select the named pane itself."
    },
    "pane": {
      "description": "The `%`-prefixed pane to select, or to move relative to.",
      "type": "string"
    }
  },
  "required": [
    "pane"
  ],
  "type": "object"
}
```

Output schema

```json
{
  "$defs": {
    "Relation": {
      "description": "How a pane relates to the process answering the request.\n\nThree values rather than a boolean, because \"not the caller's pane\" and\n\"there is no caller\" are different answers and an agent acts differently on\neach.",
      "oneOf": [
        {
          "const": "unknown",
          "description": "This process is not running inside tmux, so no pane is its own.",
          "type": "string"
        },
        {
          "const": "self",
          "description": "Confirmed: the same tmux server, and the same pane.",
          "type": "string"
        },
        {
          "const": "other",
          "description": "Some other pane, or a pane this crate cannot prove is the caller's.",
          "type": "string"
        }
      ]
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "active": {
      "description": "Whether this is the window's active pane.",
      "type": "boolean"
    },
    "caller": {
      "$ref": "#/$defs/Relation",
      "description": "Whether this is the pane the MCP server itself runs in.\n\n`self` only on a confirmed match of both socket and pane id; `other`\nfor every pane that is not, including one this crate cannot prove\neither way; `unknown` when the server is not running inside tmux, so\nthe question has no answer."
    },
    "command": {
      "description": "The command currently running.",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "The `%`-prefixed tmux identity.",
      "type": "string"
    },
    "path": {
      "description": "The pane's working directory.",
      "type": [
        "string",
        "null"
      ]
    },
    "window_id": {
      "description": "The window that contains the pane.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "window_id",
    "active",
    "caller"
  ],
  "type": "object"
}
```

Tool annotations

```json
{
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": false,
  "readOnlyHint": false,
  "title": "Select Pane"
}
```
