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

libtmux_mcp.tools.pane_tools.display_message ( format_string: str, pane_id: str | None = None, session_name: str | None = None, session_id: str | None = None, window_id: str | None = None, socket_name: str | None = None, ) → str

Read tmux variables against a target and return the substituted text.

Description#

Use this when no dedicated tool covers the field you want, e.g. '#{window_zoomed_flag}', '#{pane_dead}', '#{client_activity}'.

Accepts literal text and '#{variable}' references. Format modifiers, conditionals, and jobs are refused: tmux expands '#{E:x}' by running x's value through the expander again, and a value can arrive from a pane rather than from the caller. For raw format syntax, run 'tmux display-message -p' through run_command, where the caller supplies it on a surface labelled execution.

Returned values can carry text a pane chose, such as a working directory or a running command.

Parameters
Returns

str Expanded format string result.

Raises
  • ExpectedToolError – If format_string carries tmux format syntax other than #{variable} references.

Esc

Type to search.

Reference preview Open reference