# libtmux_mcp.tools.pane_tools.select_pane

- **Module:** libtmux_mcp.tools.pane_tools
- **Package:** libtmux-mcp
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/pane_tools/layout.py#L88
- **Page:** https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-select_pane/

```
libtmux_mcp.tools.pane_tools.select_pane(pane_id: str | None = None, direction: t.Literal["up", "down", "left", "right", "last", "next", "previous"] | None = None, window_id: str | None = None, window_index: str | None = None, session_name: str | None = None, session_id: str | None = None, socket_name: str | None = None) -> PaneInfo
```

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

Use this to navigate between panes. Provide either pane_id for direct
selection, or direction for relative navigation within a window.

## Parameters

- `pane_id` (str | None): Pane ID (e.g. '%1') for direct selection.
- `direction` (t.Literal["up", "down", "left", "right", "last", "next", "previous"] | None): Relative direction: 'up', 'down', 'left', 'right', 'last'
(previously active), 'next', or 'previous'.
- `window_id` (str | None): Window ID for directional navigation scope.
- `window_index` (str | None): Window index for directional navigation scope.
- `session_name` (str | None): Session name for resolution.
- `session_id` (str | None): Session ID for resolution.
- `socket_name` (str | None): tmux socket name.

## Returns

PaneInfo
    The now-active pane.
