# search_panes

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

> Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted. Find which panes are showing text matching a regular expression. This is the tool for 'which pane has the error', 'where is the build running', or any question about what a pane CONTAINS — the list tools only see names and sizes.

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. Find which panes are showing text matching a regular expression. This is the tool for ‘which pane has the error’, ‘where is the build running’, or any question about what a pane CONTAINS — the list tools only see names and sizes.

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

## Arguments

* `ignoreCase` optional · boolean

  Ignore case.

  Default: `true`.

* `includeHistory` optional · boolean

  Search scrollback too.

  Default: `false`.

* `maxMatchesPerPane` optional · integer

  Maximum matches per pane.

  Default: `20`.

* `pattern` required · string

  A linear-time regular expression, at most 999 UTF-8 bytes. .NET syntax without lookarounds, backreferences or atomic groups.

* `session` optional · string | null

  A session id or name. Omit for every session.

  Default: `null`.

## Schemas

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

Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "ignoreCase": {
      "default": true,
      "description": "Ignore case.",
      "type": "boolean"
    },
    "includeHistory": {
      "default": false,
      "description": "Search scrollback too.",
      "type": "boolean"
    },
    "maxMatchesPerPane": {
      "default": 20,
      "description": "Maximum matches per pane.",
      "maximum": 2147483647,
      "minimum": -2147483648,
      "type": "integer"
    },
    "pattern": {
      "description": "A linear-time regular expression, at most 999 UTF-8 bytes. .NET syntax without lookarounds, backreferences or atomic groups.",
      "type": "string"
    },
    "session": {
      "default": null,
      "description": "A session id or name. Omit for every session.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "pattern"
  ],
  "type": "object"
}
```

Output schema

```json
{
  "properties": {
    "panes": {
      "items": {
        "properties": {
          "matches": {
            "items": {
              "properties": {
                "row": {
                  "type": "integer"
                },
                "text": {
                  "type": "string"
                }
              },
              "required": [
                "row",
                "text"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "paneId": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "windowId": {
            "type": "string"
          }
        },
        "required": [
          "paneId",
          "windowId",
          "sessionId",
          "matches"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "panesSearched": {
      "type": "integer"
    },
    "pattern": {
      "type": "string"
    },
    "truncated": {
      "type": "boolean"
    }
  },
  "required": [
    "pattern",
    "panesSearched",
    "panes",
    "truncated"
  ],
  "type": "object"
}
```

Tool annotations

```json
{
  "destructiveHint": true,
  "idempotentHint": false,
  "openWorldHint": true,
  "readOnlyHint": false,
  "title": "Search panes"
}
```
