search_panes
-
Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted. Find which panes are showing something. Searches pane contents, not their names — use list_panes for metadata. Returns the matching lines with their pane, so you can target one without capturing them all. Literal matching stops at one 256 KiB aggregate UTF-8 byte budget.
- MCP request method
tools/callSendsearch_panesas the tool name, with the arguments below.
Arguments#
-
maxMatchesPerPane? (integer) #Stop after this many matches in each pane. Defaults to the server limit.
- maximum
9007199254740991- exclusiveMinimum
0
-
Non-empty literal text to find.
- minLength
1
-
Interpret pattern using libtmux’s bounded regular-expression grammar.
-
How far above the visible screen to search. Default 0.
- minimum
0- maximum
9007199254740991
-
Restrict to one session by id or name.
Result#
Returns object
-
effectiveScrollbackLines(integer) #- minimum
-9007199254740991- maximum
9007199254740991
-
-
-
- minimum
-9007199254740991- maximum
9007199254740991
-
Stable pane id, e.g. %1.
- pattern
"^%\\d+$"
-
placements(Array<object>) #
No other properties are accepted.
-
-
-
- minimum
-9007199254740991- maximum
9007199254740991
-
- minimum
-9007199254740991- maximum
9007199254740991
No other properties are accepted.
Annotations#
destructiveHinttrueidempotentHintfalseopenWorldHinttruereadOnlyHintfalse
Protocol data#
Use the complete advertised contract for validation and client integration.
Input schema
{"$schema": "http://json-schema.org/draft-07/schema#","properties": {"maxMatchesPerPane": {"description": "Stop after this many matches in each pane. Defaults to the server limit.","exclusiveMinimum": 0,"maximum": 9007199254740991,"type": "integer"},"pattern": {"description": "Non-empty literal text to find.","minLength": 1,"type": "string"},"regex": {"description": "Interpret pattern using libtmux's bounded regular-expression grammar.","type": "boolean"},"scrollbackLines": {"description": "How far above the visible screen to search. Default 0.","maximum": 9007199254740991,"minimum": 0,"type": "integer"},"session": {"description": "Restrict to one session by id or name.","type": "string"}},"required": ["pattern"],"type": "object"}Output schema
{"$schema": "http://json-schema.org/draft-07/schema#","additionalProperties": false,"properties": {"capturesByteClamped": {"type": "boolean"},"effectiveScrollbackLines": {"maximum": 9007199254740991,"minimum": -9007199254740991,"type": "integer"},"matches": {"items": {"additionalProperties": false,"properties": {"lineNumber": {"maximum": 9007199254740991,"minimum": -9007199254740991,"type": "integer"},"paneId": {"description": "Stable pane id, e.g. %1.","pattern": "^%\\d+$","type": "string"},"placements": {"items": {"additionalProperties": false,"properties": {"index": {"description": "The window index in this session.","maximum": 9007199254740991,"minimum": -9007199254740991,"type": "integer"},"sessionId": {"description": "Stable session id, e.g. $1.","pattern": "^\\$\\d+$","type": "string"},"sessionName": {"type": "string"}},"required": ["index","sessionId","sessionName"],"type": "object"},"type": "array"},"text": {"type": "string"},"windowName": {"type": "string"}},"required": ["lineNumber","paneId","placements","text","windowName"],"type": "object"},"type": "array"},"matchesTruncated": {"type": "boolean"},"matchingByteClamped": {"type": "boolean"},"matchingLineClamped": {"type": "boolean"},"matchingTimeClamped": {"type": "boolean"},"paneLimitClamped": {"type": "boolean"},"panesFailed": {"maximum": 9007199254740991,"minimum": -9007199254740991,"type": "integer"},"panesSearched": {"maximum": 9007199254740991,"minimum": -9007199254740991,"type": "integer"},"scrollbackClamped": {"type": "boolean"}},"required": ["capturesByteClamped","effectiveScrollbackLines","matches","matchingByteClamped","matchingLineClamped","matchingTimeClamped","matchesTruncated","paneLimitClamped","panesFailed","panesSearched","scrollbackClamped"],"type": "object"}