MCPconceptTools

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

C++ MCP reference

Tools

Browse the operations the server exposes to MCP clients. Use the registered name and arguments when sending a tools/call request.

The reference configuration advertises 45 tools. Your server’s available objects depend on its configuration. Setup documentation explains how to connect a client.

This catalog uses POSIX. See platform limits for the Windows preview.

Server3 tools#

create_session

Create a detached session; names and path data are literalized before tmux expansion. Start a pane’s configured process; accepts no command payload.

get_server_info

Report liveness, tmux version, and the resolved socket when running. A daemon older than 3.3a is refused: upgrade tmux and restart the server, or stay on the previous libtmux release. Inspect tmux metadata; accepts no client-supplied executable input.

list_sessions

List stable session IDs, names, paths, and client counts. Inspect tmux metadata; accepts no client-supplied executable input.

Session5 tools#

create_window

Create a detached window; name and path data are literalized before tmux expansion. Start a pane’s configured process; accepts no command payload.

get_session_info

Return one session by stable ID or name. Inspect tmux metadata; accepts no client-supplied executable input.

kill_session

Delete one session and every window it owns. Delete tmux state; accepts no command payload.

list_windows

List windows through an exact owning session. Inspect tmux metadata; accepts no client-supplied executable input.

rename_session

Replace one session name. Change tmux state; no client-supplied executable input.

Window9 tools#

get_window_info

Return one window by stable ID. Inspect tmux metadata; accepts no client-supplied executable input.

kill_window

Delete one window and every pane it owns. Delete tmux state; accepts no command payload.

list_panes

List every pane with stable pane, window, and session IDs. Inspect tmux metadata; accepts no client-supplied executable input.

move_window

Move a window to an exact index in its owning session. Change tmux state; no client-supplied executable input.

rename_window

Replace one window name. Change tmux state; no client-supplied executable input.

resize_window

Replace one window’s dimensions. Change tmux state; no client-supplied executable input.

select_layout

Replace the pane layout of one window. Names and mirrored layouts follow the selected daemon version. Saved layouts accept v1 checksums and v2 JSON; v2 requires tmux 3.8-rc2 or newer. Change tmux state; no client-supplied executable input.

select_window

Make one window active. Change tmux state; no client-supplied executable input.

split_window

Create a configured-process pane; path data is literalized before tmux expansion. Start a pane’s configured process; accepts no command payload.

Pane18 tools#

capture_pane

Return visible text, or retained history when requested. Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted.

capture_since

Return bytes after a bounded client cursor and a replacement cursor. Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted.

clear_pane_scrollback

Irreversibly discard retained scrollback for one pane. Delete tmux state; accepts no command payload.

find_pane_by_position

Resolve coordinates using fixed tmux layout fields. Inspect tmux metadata; accepts no client-supplied executable input.

get_pane_info

Return one pane by stable ID. Inspect tmux metadata; accepts no client-supplied executable input.

kill_pane

Delete one pane and its running process. Delete tmux state; accepts no command payload.

paste_text

Require the target pane to be live and outside human-owned mode, then stage a private target-only buffer, optionally append Enter, paste it once, and verify cleanup. Empty text without Enter is a guarded buffer-free no-op. Send input to a pane’s program; a shell that receives it runs it with your user’s permissions.

resize_pane

Replace one or both pane dimensions. Change tmux state; no client-supplied executable input.

respawn_pane

Restart only the pane’s configured process; no caller command is accepted. Start a pane’s configured process; accepts no command payload.

run_shell_command

Require one live configured pane, outside human-owned mode and running a supported POSIX foreground shell, then send one command and return output after its private completion boundary. Run a shell command in a pane with your user’s permissions.

search_panes

Search captured lines using a length-limited expression. Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted.

select_pane

Make one pane active. Change tmux state; no client-supplied executable input.

send_keys

Require every configured synchronized pane to be live and outside human-owned mode, then send one validated tmux key name. Send input to a pane’s program; a shell that receives it runs it with your user’s permissions.

send_keys_batch

Preflight each row’s configured synchronized pane cohort independently, requiring every pane to be live and outside human-owned mode before its text or key and optional Enter. Send input to a pane’s program; a shell that receives it runs it with your user’s permissions.

set_pane_title

Replace one pane title. Change tmux state; no client-supplied executable input.

set_synchronize_panes

Set the inherited window synchronize-panes default; pane-level overrides determine effective synchronized input membership. Change tmux state; no client-supplied executable input.

snapshot_pane

Return pane metadata and visible terminal content from one call. Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted.

swap_pane

Exchange two pane positions without changing their IDs. Change tmux state; no client-supplied executable input.

Hooks1 tool#

show_hooks

Read configured hooks, optionally filtered by exact name. Read configured tmux commands; accepts no client-supplied executable input. Returned values may contain executable configuration.

Options and environment4 tools#

set_history_limit

Replace retained-history bounds with a non-negative integer. Change tmux state; no client-supplied executable input.

set_mouse_enabled

Replace the global mouse option with a typed boolean. Change tmux state; no client-supplied executable input.

show_environment

Read global or session environment values. Read the tmux environment; accepts no client-supplied executable input. Returned values may contain secrets.

show_option

Read one exact option without accepting an option value. Read configured tmux commands; accepts no client-supplied executable input. Returned values may contain executable configuration.

Coordination2 tools#

signal_channel

Release or latch one named server-side channel. Change tmux state; no client-supplied executable input.

wait_for_channel

Wait for a named server-side channel with an optional deadline. Change tmux state; no client-supplied executable input.

Other tools3 tools#

call_read_tools_batch

Run up to sixteen declared inspect operations serially under this one call; inner operations receive no separate approval. Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted.

get_tmux_variables

Expand only validated variable identifiers, never a caller format. Read configured tmux commands; accepts no client-supplied executable input. Returned values may contain executable configuration.

wait_for_text

Discount this server’s pending input and recent submitted echoes; unmodelled keys stop tracking the current line. Wait for a new shell’s prompt before typing. matched_at_entry reports visible text at entry; a mode ending in -unconfirmed identifies input that was still unconfirmed at the deadline. Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted.

Resources

1 advertised in the reference configuration.

Resource templates

This server does not advertise resource templates in the reference configuration.

Prompts

This server does not advertise prompts in the reference configuration.

Reference configuration
LIBTMUX_TOOLSETS
inspect,manage,execute,teardown

Protocol version: 2025-11-25. Download the full protocol catalog.

Source: libtmux/libtmux-cxx@9645e54239e0.

The language API reference documents embedding and implementation types.

Esc

Type to search.

Reference preview Open reference