MCPpre-alphaAPI Reference

Choose documentation 3

stable

Current version

stable
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

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.

Description#

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 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.

Esc

Type to search.

Reference preview Open reference