# capture_pane

Source: https://libtmux.org/en/csharp/latest/mcp/tools/capture_pane/

> Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted. Read the text a pane is showing, and optionally its scrollback. The newest lines are always kept; anything dropped to fit the budget is reported. To watch a pane across several turns, use capture_since instead — it returns only what is new.

MCP is in development

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

Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted. Read the text a pane is showing, and optionally its scrollback. The newest lines are always kept; anything dropped to fit the budget is reported. To watch a pane across several turns, use [capture_since](https://libtmux.org/en/csharp/latest/mcp/tools/capture_since/) instead — it returns only what is new.

[All C# tools](https://libtmux.org/en/csharp/latest/mcp/tools/) · [JSON](https://libtmux.org/en/csharp/latest/mcp/tools/capture_pane.json) · [Source](https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux.Mcp/Policy/CapabilityModel.cs#L576)

## Arguments

* `includeHistory` optional · boolean

  Include scrollback.

  Default: `false`.

* `joinWrappedLines` optional · boolean

  Rejoin tmux-wrapped lines.

  Default: `false`.

* `maxLines` optional · integer | null

  Maximum returned lines, newest kept. Omit for the server default, 500 unless LIBTMUX_MCP_MAX_LINES sets another.

  Default: `null`.

* `paneId` optional · string | null

  A pane id. Omit for this server's own pane, or else the one the first session shows.

  Default: `null`.

## Schemas

The schema defines required fields, nested values, defaults, and validation constraints.

Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "includeHistory": {
      "default": false,
      "description": "Include scrollback.",
      "type": "boolean"
    },
    "joinWrappedLines": {
      "default": false,
      "description": "Rejoin tmux-wrapped lines.",
      "type": "boolean"
    },
    "maxLines": {
      "default": null,
      "description": "Maximum returned lines, newest kept. Omit for the server default, 500 unless LIBTMUX_MCP_MAX_LINES sets another.",
      "maximum": 2147483647,
      "minimum": -2147483648,
      "type": [
        "integer",
        "null"
      ]
    },
    "paneId": {
      "default": null,
      "description": "A pane id. Omit for this server's own pane, or else the one the first session shows.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "type": "object"
}
```

Output schema

```json
{
  "properties": {
    "content": {
      "properties": {
        "droppedBytes": {
          "type": "integer"
        },
        "droppedLines": {
          "type": "integer"
        },
        "lines": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "truncated": {
          "type": "boolean"
        }
      },
      "required": [
        "lines",
        "truncated",
        "droppedLines",
        "droppedBytes"
      ],
      "type": "object"
    },
    "paneId": {
      "type": "string"
    }
  },
  "required": [
    "paneId",
    "content"
  ],
  "type": "object"
}
```

Tool annotations

```json
{
  "destructiveHint": true,
  "idempotentHint": false,
  "openWorldHint": true,
  "readOnlyHint": false,
  "title": "Capture pane"
}
```
