# libtmux_mcp.tools.buffer_tools.show_buffer

- **Module:** libtmux_mcp.tools.buffer_tools
- **Package:** libtmux-mcp
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/buffer_tools.py#L281
- **Page:** https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-buffer_tools-show_buffer/

```
libtmux_mcp.tools.buffer_tools.show_buffer(buffer_name: str, max_lines: int | None = SHOW_BUFFER_DEFAULT_MAX_LINES, socket_name: str | None = None) -> BufferContent
```

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
:attr:`~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`` — one
consistent bounded-output contract across read-heavy tools so a
pathological ``load_buffer`` staging cannot blow the agent's
context window on a single ``show_buffer`` call.

## Parameters

- `buffer_name` (str): Must match the full MCP-namespaced form.
- `max_lines` (int | None): Maximum number of lines to return. Defaults to
:data:`SHOW_BUFFER_DEFAULT_MAX_LINES`. Pass ``None`` for no
truncation.
- `socket_name` (str | None): tmux socket name.

## Returns

BufferContent
    Structured result with ``buffer_name``, ``content``, and the
    truncation fields.
