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

pane_id

str

no

Pane ID (e.g. ‘%1’).

session_name

str

no

Session name for pane resolution.

session_id

str

no

Session ID (e.g. ‘$1’) for pane resolution.

window_id

str

no

Window ID for pane resolution.

start

int

no

Start line number. 0 is the first visible line. Negative values reach into scrollback history (e.g. -100 for last 100 lines).

end

int

no

End line number.

socket_name

str

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

pane_id

str

no

Pane ID (e.g. ‘%1’).

session_name

str

no

Session name for pane resolution.

session_id

str

no

Session ID (e.g. ‘$1’) for pane resolution.

window_id

str

no

Window ID for pane resolution.

socket_name

str

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

pattern

str

yes

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

regex

bool

no

False

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

session_name

str

no

Limit search to panes in this session.

session_id

str

no

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

match_case

bool

no

False

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

content_start

int

no

Start line for capture. Negative values reach into scrollback.

content_end

int

no

End line for capture.

socket_name

str

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

pattern

str

yes

Text to wait for. Treated as literal text by default. Set regex=True to interpret as a regular expression.

regex

bool

no

False

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

pane_id

str

no

Pane ID (e.g. ‘%1’).

session_name

str

no

Session name for pane resolution.

session_id

str

no

Session ID (e.g. ‘$1’) for pane resolution.

window_id

str

no

Window ID for pane resolution.

timeout

float

no

8.0

Maximum seconds to wait. Default 8.0.

interval

float

no

0.05

Seconds between polls. Default 0.05 (50ms).

match_case

bool

no

False

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

content_start

int

no

Start line for capture. Negative values reach into scrollback.

content_end

int

no

End line for capture.

socket_name

str

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

keys

str

yes

The keys or text to send.

pane_id

str

no

Pane ID (e.g. ‘%1’).

session_name

str

no

Session name for pane resolution.

session_id

str

no

Session ID (e.g. ‘$1’) for pane resolution.

window_id

str

no

Window ID for pane resolution.

enter

bool

no

True

Whether to press Enter after sending keys. Default True.

literal

bool

no

False

Whether to send keys literally (no tmux interpretation). Default False.

suppress_history

bool

no

False

Whether to suppress shell history by prepending a space. Only works in shells that support HISTCONTROL. Default False.

socket_name

str

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

title

str

yes

The new pane title.

pane_id

str

no

Pane ID (e.g. ‘%1’).

session_name

str

no

Session name for pane resolution.

session_id

str

no

Session ID (e.g. ‘$1’) for pane resolution.

window_id

str

no

Window ID for pane resolution.

socket_name

str

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

pane_id

str

no

Pane ID (e.g. ‘%1’).

session_name

str

no

Session name for pane resolution.

session_id

str

no

Session ID (e.g. ‘$1’) for pane resolution.

window_id

str

no

Window ID for pane resolution.

socket_name

str

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

pane_id

str

no

Pane ID (e.g. ‘%1’).

session_name

str

no

Session name for pane resolution.

session_id

str

no

Session ID (e.g. ‘$1’) for pane resolution.

window_id

str

no

Window ID for pane resolution.

height

int

no

New height in lines.

width

int

no

New width in columns.

zoom

bool

no

Toggle pane zoom. If True, zoom the pane. If False, unzoom.

socket_name

str

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

pane_id

str

yes

Pane ID (e.g. ‘%1’). Required — no fallback resolution.

socket_name

str

no

tmux socket name.