Evaluate tmux format string (display_message)

display_message

display_message
readonly tool

Evaluate a tmux format string against a target and return the expanded value.

Returns:

str

Use when you need to query arbitrary tmux variables — zoom state, pane dead flag, client activity, or any #{format} string that isn’t covered by other tools. Despite the historical name (display_message is the tmux verb it wraps), this tool does not display anything to the user; it expands the format string with display-message -p and returns the value.

Avoid when a dedicated tool already provides the information — e.g. use snapshot_pane for cursor position and mode, or get_pane_info for standard metadata.

Side effects: None. Readonly.

Example:

{
  "tool": "display_message",
  "arguments": {
    "format_string": "zoomed=#{window_zoomed_flag} dead=#{pane_dead}",
    "pane_id": "%0"
  }
}

Response (string):

zoomed=0 dead=0

Parameters

Parameter

Type

Required

Default

Description

format_string

str

yes

tmux format string (e.g. ‘#{cursor_x} #{cursor_y}’).

pane_id

str

no

Pane ID (e.g. ‘%1’).

session_name

str

no

Session name for pane resolution.

session_id

str

no

Session ID for pane resolution.

window_id

str

no

Window ID for pane resolution.

socket_name

str

no

tmux socket name.