# search_panes

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

> Search visible terminal text across all tmux panes.

tool MCPstable

MCP is in development

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

* **search_panes**( [content_end](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Fcontent_end)?: [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)"), [content_start](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Fcontent_start)?: [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)"), [limit](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Flimit)?: [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)"), [match_case](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Fmatch_case)?: [boolean](https://json-schema.org/understanding-json-schema/reference/boolean "boolean (JSON Schema)"), [max_matched_lines_per_pane](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Fmax_matched_lines_per_pane)?: [integer](https://json-schema.org/understanding-json-schema/reference/numeric "numeric (JSON Schema)"), [offset](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Foffset)?: [integer](https://json-schema.org/understanding-json-schema/reference/numeric "numeric (JSON Schema)"), [pattern](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Fpattern): [string](https://json-schema.org/understanding-json-schema/reference/string "string (JSON Schema)"), [regex](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Fregex)?: [boolean](https://json-schema.org/understanding-json-schema/reference/boolean "boolean (JSON Schema)"), [session_id](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.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/stable/mcp/tools/search_panes/#mcp.tool.search_panes.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/stable/mcp/tools/search_panes/#mcp.tool.search_panes.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/pane_tools/__init__.py#L146)][¶](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes)

  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.

  * MCP request method

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

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

  * **[`content_end`](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Fcontent_end)**? = `null` ([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)"))

    End line for capture.

  * **[`content_start`](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Fcontent_start)**? = `null` ([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)"))

    Start line for capture. Negative values reach into scrollback.

  * **[`limit`](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Flimit)**? = `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 matching panes returned on this call. Defaults to `SEARCH_DEFAULT_LIMIT`. Pass `None` to disable the cap.

  * **[`match_case`](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Fmatch_case)**? = `false` ([boolean](https://json-schema.org/understanding-json-schema/reference/boolean "boolean (JSON Schema)"))

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

  * **[`max_matched_lines_per_pane`](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Fmax_matched_lines_per_pane)**? = `50` ([integer](https://json-schema.org/understanding-json-schema/reference/numeric "numeric (JSON Schema)"))

    Per-pane cap on `matched_lines`. Defaults to `SEARCH_DEFAULT_MAX_LINES_PER_PANE`.

  * **[`offset`](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Foffset)**? = `0` ([integer](https://json-schema.org/understanding-json-schema/reference/numeric "numeric (JSON Schema)"))

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

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

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

  * **[`regex`](https://libtmux.org/en/py/stable/mcp/tools/search_panes/#mcp.tool.search_panes.input%2Fproperties%2Fregex)**? = `false` ([boolean](https://json-schema.org/understanding-json-schema/reference/boolean "boolean (JSON Schema)"))

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

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

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

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

    Limit search to panes in this session.

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

  Use the complete advertised contract for validation and client integration.

  Input schema

  ```json
  {
    "additionalProperties": false,
    "properties": {
      "content_end": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "End line for capture."
      },
      "content_start": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Start line for capture. Negative values reach into scrollback."
      },
      "limit": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "default": 500,
        "description": "Maximum matching panes returned on this call. Defaults to\n``SEARCH_DEFAULT_LIMIT``. Pass ``None`` to disable the cap."
      },
      "match_case": {
        "default": false,
        "description": "Whether to match case. Default False (case-insensitive).",
        "type": "boolean"
      },
      "max_matched_lines_per_pane": {
        "default": 50,
        "description": "Per-pane cap on ``matched_lines``. Defaults to\n``SEARCH_DEFAULT_MAX_LINES_PER_PANE``.",
        "type": "integer"
      },
      "offset": {
        "default": 0,
        "description": "Skip this many matching panes from the start. Use with\n``limit`` for pagination.",
        "type": "integer"
      },
      "pattern": {
        "description": "Text to search for in pane contents. Treated as literal text by\ndefault. Set ``regex=True`` to interpret as a regular expression.",
        "type": "string"
      },
      "regex": {
        "default": false,
        "description": "Whether to interpret pattern as a regular expression. Default False\n(literal text matching).",
        "type": "boolean"
      },
      "session_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Limit search to panes in this session (by ID)."
      },
      "session_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "Limit search to panes in this session."
      },
      "socket_name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "default": null,
        "description": "tmux socket name."
      }
    },
    "required": [
      "pattern"
    ],
    "type": "object"
  }
  ```
