{
  "name": "search_panes",
  "wireName": "search_panes",
  "source": {
    "repo": "libtmux/libtmux-rs",
    "revision": "f0e37052c232636b61d095817046e6bfc8f2ca40",
    "extractedRevision": "7a5def5921b12f58d47327cf625c039de5fa8ea7",
    "file": "crates/tmux-mcp/src/tools/inspect.rs",
    "line": 344
  },
  "description": "Search what panes are displaying with Rust's linear-time regex engine. Accept at most 4,096 pattern bytes; search at most 64 panes, 8,192 lines, and 1 MiB; spend at most 250 ms matching and five seconds capturing. Report the pane and line of every match. Use this to find where something is -- which pane has the failing test, which one printed the error -- instead of capturing panes one at a time. Searches the visible screen by default; set history to include scrollback. Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted.",
  "schemaStatus": "runtime",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "history": {
        "default": false,
        "description": "Search scrollback as well as the visible screen.",
        "type": "boolean"
      },
      "match_case": {
        "default": false,
        "description": "Match case. Off by default.",
        "type": "boolean"
      },
      "pattern": {
        "description": "The text to look for.",
        "maxLength": 4096,
        "type": "string"
      },
      "regex": {
        "default": false,
        "description": "Read the pattern as a regular expression rather than literal text.",
        "type": "boolean"
      },
      "session": {
        "description": "Only search panes in this session, by `$`-prefixed id or name. Omit\nfor every session.",
        "type": [
          "string",
          "null"
        ]
      },
      "window": {
        "description": "Only search panes in this window, by `@`-prefixed id. Omit for every\nwindow.",
        "type": [
          "string",
          "null"
        ]
      }
    },
    "required": [
      "pattern"
    ],
    "type": "object"
  },
  "outputSchema": {
    "$defs": {
      "MatchView": {
        "description": "One line of one pane that matched a search.",
        "properties": {
          "line": {
            "description": "Which line of the capture matched, counting from the top.",
            "minimum": 0,
            "type": "integer"
          },
          "pane": {
            "description": "The pane the line was found in.",
            "type": "string"
          },
          "text": {
            "description": "The line itself.",
            "type": "string"
          },
          "window_id": {
            "description": "The window that pane belongs to.",
            "type": "string"
          }
        },
        "required": [
          "pane",
          "window_id",
          "line",
          "text"
        ],
        "type": "object"
      }
    },
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "properties": {
      "capped": {
        "description": "Whether the match ceiling was reached, so there may be more.",
        "type": "boolean"
      },
      "matches": {
        "description": "Every matching line, in the order the panes were read.",
        "items": {
          "$ref": "#/$defs/MatchView"
        },
        "type": "array"
      },
      "panes_searched": {
        "description": "How many panes were read to answer this.",
        "minimum": 0,
        "type": "integer"
      }
    },
    "required": [
      "matches",
      "panes_searched",
      "capped"
    ],
    "type": "object"
  },
  "annotations": {
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": true,
    "readOnlyHint": true,
    "title": "Search Pane Contents"
  },
  "meta": {
    "com.git-pull.libtmux-mcp/capability": {
      "amplifiesFutureInput": false,
      "inputLiteralization": {},
      "mayExposeSecrets": true,
      "mayReturnUntrustedContent": true,
      "nestedAuthority": [],
      "outputClasses": [
        "tmux-metadata",
        "terminal-content"
      ],
      "processReach": "none",
      "tmuxEffects": [
        "observe"
      ],
      "toolset": "inspect"
    }
  }
}
