# libtmux_mcp.tools.pane_tools.find_pane_by_position

- **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/lifecycle.py#L268
- **Page:** https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-find_pane_by_position/

```
libtmux_mcp.tools.pane_tools.find_pane_by_position(corner: PaneCorner, 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
```

Find the pane occupying a corner of a tmux window.

Composes the four ``pane_at_*`` predicates so callers can target a
layout-relative position (e.g. "the bottom-right pane") in one
round-trip instead of listing every pane and computing the
geometry. Resolves the window the same way as the other
window-scoped tools.

## Parameters

- `corner` (PaneCorner): One of ``'top-left'``, ``'top-right'``, ``'bottom-left'``,
``'bottom-right'``.
- `window_id` (str | None): Window ID (e.g. '@1').
- `window_index` (str | None): Window index. Requires session_name or session_id.
- `session_name` (str | None): Session name.
- `session_id` (str | None): Session ID.
- `socket_name` (str | None): tmux socket name.

## Returns

PaneInfo
    Serialized pane occupying the requested corner.

## Raises

- `ExpectedToolError`: If no pane satisfies both edge predicates for that corner — in
practice only possible for layouts tmux itself produced via
custom layout strings; the built-in layouts always have a pane
at every corner.
