display_message
- display_message( format_string: string, pane_id?: string | null, session_id?: string | null, session_name?: string | null, socket_name?: string | null, window_id?: string | null, )
-
Read tmux variables against a target and return the substituted text.
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.
- MCP request method
tools/callSenddisplay_messageas the tool name, with the arguments below.- Wraps
libtmux.Pane.display_messageThe library call this tool makes:src/libtmux_mcp/tools/pane_tools/meta.py:100.
Arguments
-
pane_id? =null(string | null)Pane ID (e.g. ‘%1’).
-
session_id? =null(string | null)Session ID for pane resolution.
-
session_name? =null(string | null)Session name for pane resolution.
-
socket_name? =null(string | null)tmux socket name.
-
window_id? =null(string | null)Window ID for pane resolution.
No other arguments are accepted.
Result
Returns object
Annotations
Advertised by the server
destructiveHinttrueidempotentHintfalseopenWorldHinttruereadOnlyHintfalse
Capability
- Toolset
- Inspect Request tmux state and terminal output.
Every Python tool advertises the same annotations, so a host that approves by annotation cannot tell tools apart. The capability row is what tells them apart.
Protocol data
Use the complete advertised contract for validation and client integration.
Input schema
{"additionalProperties": false,"properties": {"format_string": {"description": "Literal text and '#{variable}' references (e.g.\n'#{cursor_x} #{cursor_y}').","type": "string"},"pane_id": {"anyOf": [{"type": "string"},{"type": "null"}],"default": null,"description": "Pane ID (e.g. '%1')."},"session_id": {"anyOf": [{"type": "string"},{"type": "null"}],"default": null,"description": "Session ID for pane resolution."},"session_name": {"anyOf": [{"type": "string"},{"type": "null"}],"default": null,"description": "Session name for pane resolution."},"socket_name": {"anyOf": [{"type": "string"},{"type": "null"}],"default": null,"description": "tmux socket name."},"window_id": {"anyOf": [{"type": "string"},{"type": "null"}],"default": null,"description": "Window ID for pane resolution."}},"required": ["format_string"],"type": "object"}Output schema
{"properties": {"result": {"type": "string"}},"required": ["result"],"type": "object","x-fastmcp-wrap-result": true}