Panes¶
Inspect readonly¶
capture_pane readonly¶
Capture the visible contents of a tmux pane.
Returns: str
Use when you need to read what’s currently displayed in a terminal — after running a command, checking output, or verifying state.
Avoid when you need to search across multiple panes at once — use
search_panes readonly. If you only need pane metadata (not content), use
get_pane_info readonly.
Side effects: None. Readonly.
Example:
{
"tool": "capture_pane",
"arguments": {
"pane_id": "%0",
"start": -50
}
}
Response (string):
$ echo "Running tests..."
Running tests...
$ echo "PASS: test_auth (0.3s)"
PASS: test_auth (0.3s)
$ echo "FAIL: test_upload (AssertionError)"
FAIL: test_upload (AssertionError)
$ echo "3 tests: 2 passed, 1 failed"
3 tests: 2 passed, 1 failed
$
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
— |
Pane ID (e.g. ‘%1’). |
|
|
no |
— |
Session name for pane resolution. |
|
|
no |
— |
Session ID (e.g. ‘$1’) for pane resolution. |
|
|
no |
— |
Window ID for pane resolution. |
|
|
no |
— |
Start line number. 0 is the first visible line. Negative values reach into scrollback history (e.g. -100 for last 100 lines). |
|
|
no |
— |
End line number. |
|
|
no |
— |
tmux socket name. |
get_pane_info readonly¶
Get detailed information about a tmux pane.
Returns: PaneInfo
Use when you need pane dimensions, PID, current working directory, or other metadata without reading the terminal content.
Avoid when you need the actual text — use capture_pane readonly.
Side effects: None. Readonly.
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
— |
Pane ID (e.g. ‘%1’). |
|
|
no |
— |
Session name for pane resolution. |
|
|
no |
— |
Session ID (e.g. ‘$1’) for pane resolution. |
|
|
no |
— |
Window ID for pane resolution. |
|
|
no |
— |
tmux socket name. |
search_panes readonly¶
Search for text across all pane contents.
Returns: list[PaneContentMatch]
Use when you need to find specific text across multiple panes — locating which pane has an error, finding a running process, or checking output without knowing which pane to look in.
Avoid when you already know the target pane — use capture_pane readonly
directly.
Side effects: None. Readonly.
Example:
{
"tool": "search_panes",
"arguments": {
"pattern": "FAIL",
"session_name": "dev"
}
}
Response:
[
{
"pane_id": "%0",
"pane_current_command": "zsh",
"pane_current_path": "/home/user/myproject",
"window_id": "@0",
"window_name": "editor",
"session_id": "$0",
"session_name": "dev",
"matched_lines": [
"FAIL: test_upload (AssertionError)",
"3 tests: 2 passed, 1 failed"
],
"is_caller": null
}
]
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
— |
Text to search for in pane contents. Treated as literal text by default. Set |
|
|
no |
|
Whether to interpret pattern as a regular expression. Default False (literal text matching). |
|
|
no |
— |
Limit search to panes in this session. |
|
|
no |
— |
Limit search to panes in this session (by ID). |
|
|
no |
|
Whether to match case. Default False (case-insensitive). |
|
|
no |
— |
Start line for capture. Negative values reach into scrollback. |
|
|
no |
— |
End line for capture. |
|
|
no |
— |
tmux socket name. |
wait_for_text readonly¶
Wait for text to appear in a tmux pane.
Returns: WaitForTextResult
Use when you need to block until specific output appears — waiting for a server to start, a build to complete, or a prompt to return.
Avoid when you can poll with capture_pane readonly instead, or if the
expected text may never appear (set a timeout).
Side effects: None. Readonly. Blocks until text appears or timeout.
Example:
{
"tool": "wait_for_text",
"arguments": {
"pattern": "Server listening",
"pane_id": "%2",
"timeout": 30
}
}
Response:
{
"found": true,
"matched_lines": [
"Server listening on port 8000"
],
"pane_id": "%2",
"elapsed_seconds": 0.002,
"timed_out": false
}
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
— |
Text to wait for. Treated as literal text by default. Set |
|
|
no |
|
Whether to interpret pattern as a regular expression. Default False (literal text matching). |
|
|
no |
— |
Pane ID (e.g. ‘%1’). |
|
|
no |
— |
Session name for pane resolution. |
|
|
no |
— |
Session ID (e.g. ‘$1’) for pane resolution. |
|
|
no |
— |
Window ID for pane resolution. |
|
|
no |
|
Maximum seconds to wait. Default 8.0. |
|
|
no |
|
Seconds between polls. Default 0.05 (50ms). |
|
|
no |
|
Whether to match case. Default False (case-insensitive). |
|
|
no |
— |
Start line for capture. Negative values reach into scrollback. |
|
|
no |
— |
End line for capture. |
|
|
no |
— |
tmux socket name. |
Act mutating¶
send_keys mutating¶
Send keys (commands or text) to a tmux pane.
Returns: str
Use when you need to type commands, press keys, or interact with a terminal. This is the primary way to execute commands in tmux panes.
Avoid when you need to run something and immediately capture the result —
send keys first, then use capture_pane readonly or wait_for_text readonly.
Side effects: Sends keystrokes to the pane. If enter is true (default),
the command executes.
Example:
{
"tool": "send_keys",
"arguments": {
"keys": "npm start",
"pane_id": "%2"
}
}
Response (string):
Keys sent to pane %2
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
— |
The keys or text to send. |
|
|
no |
— |
Pane ID (e.g. ‘%1’). |
|
|
no |
— |
Session name for pane resolution. |
|
|
no |
— |
Session ID (e.g. ‘$1’) for pane resolution. |
|
|
no |
— |
Window ID for pane resolution. |
|
|
no |
|
Whether to press Enter after sending keys. Default True. |
|
|
no |
|
Whether to send keys literally (no tmux interpretation). Default False. |
|
|
no |
|
Whether to suppress shell history by prepending a space. Only works in shells that support HISTCONTROL. Default False. |
|
|
no |
— |
tmux socket name. |
set_pane_title mutating¶
Set the title of a tmux pane.
Returns: PaneInfo
Use when you want to label a pane for identification.
Side effects: Changes the pane title.
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
— |
The new pane title. |
|
|
no |
— |
Pane ID (e.g. ‘%1’). |
|
|
no |
— |
Session name for pane resolution. |
|
|
no |
— |
Session ID (e.g. ‘$1’) for pane resolution. |
|
|
no |
— |
Window ID for pane resolution. |
|
|
no |
— |
tmux socket name. |
clear_pane mutating¶
Clear the contents of a tmux pane.
Returns: str
Use when you want a clean terminal before capturing output.
Side effects: Clears the pane’s visible content.
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
— |
Pane ID (e.g. ‘%1’). |
|
|
no |
— |
Session name for pane resolution. |
|
|
no |
— |
Session ID (e.g. ‘$1’) for pane resolution. |
|
|
no |
— |
Window ID for pane resolution. |
|
|
no |
— |
tmux socket name. |
resize_pane mutating¶
Resize a tmux pane.
Returns: PaneInfo
Use when you need to adjust pane dimensions.
Side effects: Changes pane size. May affect adjacent panes.
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
no |
— |
Pane ID (e.g. ‘%1’). |
|
|
no |
— |
Session name for pane resolution. |
|
|
no |
— |
Session ID (e.g. ‘$1’) for pane resolution. |
|
|
no |
— |
Window ID for pane resolution. |
|
|
no |
— |
New height in lines. |
|
|
no |
— |
New width in columns. |
|
|
no |
— |
Toggle pane zoom. If True, zoom the pane. If False, unzoom. |
|
|
no |
— |
tmux socket name. |
Destroy destructive¶
kill_pane destructive¶
Kill (close) a tmux pane. Requires exact pane_id (e.g. ‘%5’).
Returns: str
Use when you’re done with a specific terminal and want to remove it without affecting sibling panes.
Avoid when you want to remove the entire window — use kill_window destructive.
Side effects: Destroys the pane. Not reversible.
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
|
yes |
— |
Pane ID (e.g. ‘%1’). Required — no fallback resolution. |
|
|
no |
— |
tmux socket name. |