# search_panes

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

> Search visible terminal text across all tmux panes.

MCP is in development

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

Search visible terminal text across all tmux panes.

Use when the user asks what panes ‘contain’, ‘mention’, or ‘show’ — e.g. ‘find the pane with the pytest failure’. Searches each pane’s visible terminal scrollback content (not editor or browser text) and returns panes where the pattern is found, with matching lines.

[All Python tools](../) · [JSON](../search_panes.json) · [Source](https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/pane_tools/__init__.py#L146)

## Arguments

* `content_end` optional

  End line for capture.

  Default: `null`.

* `content_start` optional

  Start line for capture. Negative values reach into scrollback.

  Default: `null`.

* `limit` optional

  Maximum matching panes returned on this call. Defaults to \`\`SEARCH\_DEFAULT\_LIMIT\`\`. Pass \`\`None\`\` to disable the cap.

  Default: `500`.

* `match_case` optional · boolean

  Whether to match case. Default False (case-insensitive).

  Default: `false`.

* `max_matched_lines_per_pane` optional · integer

  Per-pane cap on \`\`matched\_lines\`\`. Defaults to \`\`SEARCH\_DEFAULT\_MAX\_LINES\_PER\_PANE\`\`.

  Default: `50`.

* `offset` optional · integer

  Skip this many matching panes from the start. Use with \`\`limit\`\` for pagination.

  Default: `0`.

* `pattern` required · string

  Text to search for in pane contents. Treated as literal text by default. Set \`\`regex=True\`\` to interpret as a regular expression.

* `regex` optional · boolean

  Whether to interpret pattern as a regular expression. Default False (literal text matching).

  Default: `false`.

* `session_id` optional

  Limit search to panes in this session (by ID).

  Default: `null`.

* `session_name` optional

  Limit search to panes in this session.

  Default: `null`.

* `socket_name` optional

  tmux socket name.

  Default: `null`.

## Schemas

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