# libtmux_mcp.tools.hook_tools.show_hooks

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

```
libtmux_mcp.tools.hook_tools.show_hooks(scope: t.Literal["server", "session", "window", "pane"] | None = None, target: str | None = None, global_: bool = False, socket_name: str | None = None) -> HookListResult
```

List configured tmux hooks at the given scope.

``scope="server"`` enumerates hooks installed via
``tmux set-hook -g ...``. tmux splits those globals across two
options trees by hook category: session-level hooks
(``session-closed``, ``client-*``, etc.) live in the
global-session tree enumerated by ``show-hooks -g``, while
pane/window-level hooks (``pane-focus-in``, ``window-resized``,
etc.) live in the global-window tree enumerated by
``show-hooks -gw``. This tool consults both trees and merges the
results so the enumeration matches what a name-targeted
:func:`~libtmux_mcp.tools.hook_tools.show_hook` call would return.

## Parameters

- `scope` (t.Literal["server", "session", "window", "pane"] | None): Hook scope (server/session/window/pane). Defaults to the
calling object's scope when a ``target`` is given.
- `target` (str | None): Target identifier. For session scope: session name. For window
scope: window ID. For pane scope: pane ID. Requires ``scope``.
- `global_` (bool): Pass ``-g`` to query global hooks. Default False.
- `socket_name` (str | None): tmux socket name.

## Returns

HookListResult
    Flat list of hook-name / index / command entries.
