# show_buffer

Source: https://libtmux.org/en/py/stable/mcp/tools/show_buffer/

> Read back the contents of an MCP-owned buffer.

tool MCPstable

MCP is in development

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

* **show_buffer**( [buffer_name](https://libtmux.org/en/py/stable/mcp/tools/show_buffer/#mcp.tool.show_buffer.input%2Fproperties%2Fbuffer_name): [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"), [max_lines](https://libtmux.org/en/py/stable/mcp/tools/show_buffer/#mcp.tool.show_buffer.input%2Fproperties%2Fmax_lines)?: [integer](https://json-schema.org/understanding-json-schema/reference/numeric "numeric (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"), [socket_name](https://libtmux.org/en/py/stable/mcp/tools/show_buffer/#mcp.tool.show_buffer.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)"), )

  tool \[[source](https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/buffer_tools.py#L396)][¶](https://libtmux.org/en/py/stable/mcp/tools/show_buffer/#mcp.tool.show_buffer)

  Read back the contents of an MCP-owned buffer.

  Output is tail-preserved: when the buffer exceeds `max_lines` the oldest lines are dropped and [`content_truncated`](https://libtmux.org/en/py/stable/mcp/reference/libtmux_mcp-models-buffercontent-content_truncated/) is set so the caller can tell truncation happened and opt in to a full read via `max_lines=None`. This mirrors [`capture_pane`](https://libtmux.org/en/py/stable/mcp/tools/capture_pane/) — one consistent bounded-output contract across read-heavy tools so a pathological [`load_buffer`](https://libtmux.org/en/py/stable/mcp/tools/load_buffer/) staging cannot blow the agent’s context window on a single `show_buffer` call.

  * MCP request method

    `tools/call` Send `show_buffer` as the tool name, with the arguments below.

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

  * **[`buffer_name`](https://libtmux.org/en/py/stable/mcp/tools/show_buffer/#mcp.tool.show_buffer.input%2Fproperties%2Fbuffer_name)** ([string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"))

    Must match the full MCP-namespaced form.

  * **[`max_lines`](https://libtmux.org/en/py/stable/mcp/tools/show_buffer/#mcp.tool.show_buffer.input%2Fproperties%2Fmax_lines)**? = `500` ([integer](https://json-schema.org/understanding-json-schema/reference/numeric "numeric (JSON Schema)") | [null](https://json-schema.org/understanding-json-schema/reference/null "null (JSON Schema)"))

    Maximum number of lines to return. Defaults to [`SHOW_BUFFER_DEFAULT_MAX_LINES`](https://libtmux.org/en/py/stable/mcp/reference/libtmux_mcp-tools-buffer_tools-show_buffer_default_max_lines/). Pass `None` for no truncation.

  * **[`socket_name`](https://libtmux.org/en/py/stable/mcp/tools/show_buffer/#mcp.tool.show_buffer.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.

  No other arguments are accepted.

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

  This server does not advertise an output schema for this tool. Its description defines the returned content.

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

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

    `true`

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

    `false`

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

    `true`

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

    `false`

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

  Use the complete advertised contract for validation and client integration.

  Input schema

  ```json
  {
    "additionalProperties": false,
    "properties": {
      "buffer_name": {
        "description": "Must match the full MCP-namespaced form.",
        "type": "string"
      },
      "max_lines": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "default": 500,
        "description": "Maximum number of lines to return. Defaults to\n:data:`SHOW_BUFFER_DEFAULT_MAX_LINES`. Pass ``None`` for no\ntruncation."
      },
      "socket_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "tmux socket name."
      }
    },
    "required": [
      "buffer_name"
    ],
    "type": "object"
  }
  ```
