# display_message

Source: https://libtmux.org/en/py/latest/mcp/tools/display_message/

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

tool MCPlatest

MCP is in development

Server behavior and tool contracts may change. Tool availability depends on the server configuration.

* **display_message**( [format_string](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.input%2Fproperties%2Fformat_string): [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"), [pane_id](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.input%2Fproperties%2Fpane_id)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), [session_id](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.input%2Fproperties%2Fsession_id)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), [session_name](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.input%2Fproperties%2Fsession_name)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), [socket_name](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.input%2Fproperties%2Fsocket_name)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), [window_id](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.input%2Fproperties%2Fwindow_id)?: [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), )

  tool \[[source](https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/pane_tools/__init__.py#L179)][¶](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message)

  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](https://libtmux.org/en/tmux/latest/catalog/formats/window_zoomed_flag/)}’, ’#{[pane_dead](https://libtmux.org/en/tmux/latest/catalog/formats/pane_dead/)}’, ’#{[client_activity](https://libtmux.org/en/tmux/latest/catalog/formats/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](https://libtmux.org/en/tmux/latest/manual/display-message/) -p’ through [run_command](https://libtmux.org/en/py/latest/mcp/tools/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/call` Send `display_message` as the tool name, with the arguments below.

  ## Arguments[#](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.parameters)

  * **[`format_string`](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.input%2Fproperties%2Fformat_string)** ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"))

    Literal text and ’#{variable}’ references (e.g. ’#{[cursor_x](https://libtmux.org/en/tmux/latest/catalog/formats/cursor_x/)} #{[cursor_y](https://libtmux.org/en/tmux/latest/catalog/formats/cursor_y/)}’).

  * **[`pane_id`](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.input%2Fproperties%2Fpane_id)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

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

  * **[`session_id`](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.input%2Fproperties%2Fsession_id)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    Session ID for pane resolution.

  * **[`session_name`](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.input%2Fproperties%2Fsession_name)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    Session name for pane resolution.

  * **[`socket_name`](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.input%2Fproperties%2Fsocket_name)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    tmux socket name.

  * **[`window_id`](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.input%2Fproperties%2Fwindow_id)**? = `null` ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    Window ID for pane resolution.

  No other arguments are accepted.

  ## Result[#](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.result)

  Returns [object](https://json-schema.org/understanding-json-schema/reference/object "object (JSON Schema)")

  * **[`result`](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.output%2Fproperties%2Fresult)** ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"))

  ## Annotations[#](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.annotations)

  * [`destructiveHint`](https://libtmux.org/en/py/latest/mcp/reference/glossary/#destructiveHint)

    `true`

  * [`idempotentHint`](https://libtmux.org/en/py/latest/mcp/reference/glossary/#idempotentHint)

    `false`

  * [`openWorldHint`](https://libtmux.org/en/py/latest/mcp/reference/glossary/#openWorldHint)

    `true`

  * [`readOnlyHint`](https://libtmux.org/en/py/latest/mcp/reference/glossary/#readOnlyHint)

    `false`

  ## Protocol data[#](https://libtmux.org/en/py/latest/mcp/tools/display_message/#mcp.tool.display_message.schemas)

  Use the complete advertised contract for validation and client integration.

  Input schema

  ```json
  {
    "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

  ```json
  {
    "properties": {
      "result": {
        "type": "string"
      }
    },
    "required": [
      "result"
    ],
    "type": "object",
    "x-fastmcp-wrap-result": true
  }
  ```
