Select pane

select_pane

select_pane
mutating tool

Select (focus) a tmux pane by ID or direction.

Returns:

PaneInfo

Use when you need to focus a specific pane — by ID for a known target, or by direction (up, down, left, right, last, next, previous) to navigate a multi-pane layout.

Side effects: Changes the active pane in the window.

Example:

{
  "tool": "select_pane",
  "arguments": {
    "direction": "down",
    "window_id": "@0"
  }
}

Response:

{
  "pane_id": "%1",
  "pane_index": "1",
  "pane_width": "80",
  "pane_height": "11",
  "pane_current_command": "zsh",
  "pane_current_path": "/home/user/myproject",
  "pane_pid": "12400",
  "pane_title": "",
  "pane_active": "1",
  "window_id": "@0",
  "session_id": "$0",
  "is_caller": false
}

Parameters

Parameter

Type

Required

Default

Description

pane_id

str

no

Pane ID (e.g. ‘%1’) for direct selection.

direction

enum

no

Relative direction: ‘up’, ‘down’, ‘left’, ‘right’, ‘last’ (previously active), ‘next’, or ‘previous’. One of: 'up', 'down', 'left', 'right', 'last', 'next', 'previous'.

window_id

str

no

Window ID for directional navigation scope.

window_index

str

no

Window index for directional navigation scope.

session_name

str

no

Session name for resolution.

session_id

str

no

Session ID for resolution.

socket_name

str

no

tmux socket name.