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.
Server3 tools#
Create a new detached tmux session. Start a pane’s configured process; accepts no command payload.
Report every session with its windows and panes, in one call. Prefer this over calling the three listing tools separately: it costs tmux four commands rather than one per object. Inspect tmux metadata; accepts no client-supplied executable input.
List every tmux session on the server. Inspect tmux metadata; accepts no client-supplied executable input.
Session5 tools#
Create a window running its configured process. Start a pane’s configured process; accepts no command payload.
Return metadata for one session. Inspect tmux metadata; accepts no client-supplied executable input.
Kill a tmux session and everything in it. Delete tmux state; accepts no command payload.
List every window on the server. A window linked into several sessions appears once per link, so an id can repeat with a different session_id. Inspect tmux metadata; accepts no client-supplied executable input.
Rename one session. Change tmux state; no client-supplied executable input.
Window9 tools#
Return metadata for one window. Inspect tmux metadata; accepts no client-supplied executable input.
Kill a window, closing it in every session that links it. Delete tmux state; accepts no command payload.
List every pane on the server. Inspect tmux metadata; accepts no client-supplied executable input.
Move one window to a session and index. Change tmux state; no client-supplied executable input.
Rename one window. Change tmux state; no client-supplied executable input.
Resize one window to exact cell dimensions. Change tmux state; no client-supplied executable input.
Rearrange a window’s panes using a saved tmux layout or a named layout and its unique abbreviation. Names follow the running daemon’s version; mirrored main layouts require tmux 3.5. Invalid syntax is refused before window lookup. Return the saved layout tmux actually applied. Change tmux state; no client-supplied executable input.
Select a window, making it its session’s active window. Give a direction to move relative to it instead: next and previous step through the session in index order, and last returns to the previously active window. Change tmux state; no client-supplied executable input.
Split a window and start the configured process with no command payload. Start a pane’s configured process; accepts no command payload.
Pane18 tools#
Read a pane’s contents. Reads the visible screen by default; set history to reach output that has scrolled off, or give a start and end line. Set last_command to get only what the last command printed, which is usually what you want and is far shorter — it needs tmux 3.7 and a shell that marks its prompts, and says so when it cannot. Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted.
Read what a pane wrote since the previous call. The first call, with no cursor, starts watching and returns a cursor; later calls pass it back and receive only what is new, as the raw output stream, not the rendered screen: a line redrawn in place repeats; capture_pane shows the screen. Use this to follow a pane over several turns without re-reading the whole screen. The answer says missed=true if the cursor no longer names retained output, including when the pane outran the buffer, its live tail was evicted, or the server restarted. Starting a tail owns a retained observer until the tail is evicted or the server stops. Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted.
Discard a pane’s scrollback, so the next capture_pane returns only what happens next. Use this before running something whose output you want to read cleanly: it is far cheaper than reading past the old output every time. The visible screen is left alone. Delete tmux state; accepts no command payload.
Find the pane touching a named window corner. Inspect tmux metadata; accepts no client-supplied executable input.
Return metadata for one pane. Inspect tmux metadata; accepts no client-supplied executable input.
Kill a pane. Killing a window’s last pane closes the window. Delete tmux state; accepts no command payload.
Put text into a pane through a tmux paste buffer instead of typing it key by key. Use this for anything long or awkward: send_keys types the text, so a shell reading it can react to each character, and a bracketed-paste aware program treats a paste as one block. Optional Enter is appended to that same block. Empty text without Enter is a guarded buffer-free no-op. Paste targets only the named pane, even when synchronized input is enabled. A dead, input-disabled, mode-owned, terminal-attended, or inherited-caller target is refused before setup and again immediately before paste. The private buffer is deleted after setup, refusal, and paste outcomes; observations can still race with tmux. A submitted paste is remembered briefly so wait_for_text can discount its own echo. Send input to a pane’s program; a shell that receives it runs it with your user’s permissions.
Move one edge of a pane by a number of rows or columns. Change tmux state; no client-supplied executable input.
Restart a pane’s configured process with no command payload. Start a pane’s configured process; accepts no command payload.
Run a shell command in a pane, wait for it to finish, and report its exit status with everything it wrote. This is the tool for “run this and tell me if it worked”. Output is the pane’s raw output stream, not the rendered screen: nothing is missed, the shell prompt is not included, and a line redrawn in place repeats; capture_pane shows the screen. The command runs in a subshell, so cd and export do not persist and invalid syntax completes with a nonzero status. Valid inherited Bash and zsh ERR and DEBUG traps remain visible to the command while parent-shell traps and options remain unchanged. It requires one configured input recipient and observes its mode, liveness, input-off state, attended-client state, cohort, inherited-caller relation, known POSIX shell, and resolved route before watcher setup and again before dispatch. A process-wide endpoint-and-pane reservation blocks other MCP pane input until the completion marker or pane closure is proved. The resolved tmux executable and socket path must contain no ASCII terminal-control bytes. The reservation serializes this MCP’s input, but tmux observations can still race with dispatch. The pane shell, tmux server, and configuration must be trusted. Reaching the deadline, cancelling, or an uncertain dispatch stops this request while its watcher keeps the reservation until completion is proved. To stop the command, send_keys with keys [“C-c”] alone passes the reservation, and the command reports completion when it ends; respawn_pane with kill_first replaces a program that ignores C-c and C-. Run a shell command in a pane with your user’s permissions.
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.
Select a pane, making it its window’s active pane. Give a direction to move relative to it instead: up, down, left, and right follow the layout, last returns to the previously active pane, and next and previous step through the window in order. Change tmux state; no client-supplied executable input.
Type text into a pane, press named keys in it, or both. text is sent literally, so C-c in it types those three characters. Use keys for anything without a character of its own — C-c to interrupt a running command, Escape, Up, C-d — which are tmux key names and are interpreted. Text, keys, and optional Enter keep that order in one tmux dispatch. Before input, the configured synchronized-pane cohort is observed; a dead, input-disabled, mode-owned, terminal-attended, or inherited-caller member refuses the whole call, and so does an active run_shell_command, except for keys C-c or C-\ sent alone, which interrupt it. Returned pane IDs describe configured membership, not confirmed delivery. The observation can race with tmux processing the input. A submitted line is remembered briefly so wait_for_text can discount its own echo; an unrecognized key stops that for the pane’s current line rather than mask it inaccurately. Send input to a pane’s program; a shell that receives it runs it with your user’s permissions.
Send an ordered batch of input operations to panes. Each executed row repeats send_keys’ effective synchronized-cohort, dead-pane, input-off, pane-mode, attended-client, and inherited-caller preflight, then crosses one tmux dispatch. These observations can race with tmux processing the input. Send input to a pane’s program; a shell that receives it runs it with your user’s permissions.
Set one pane’s title. Change tmux state; no client-supplied executable input.
Set the window default for synchronized pane input. Individual pane overrides still determine the effective configured cohort, so enabling this can amplify what one send_keys call reaches. Change tmux state; no client-supplied executable input.
Read pane content with cursor position, mode state, and scroll position in one reply. The state query and capture are separate, so the result is not atomic. Prefer this over capture_pane when you need to reason about where the pane is rather than only what it says — a cursor at column zero on a fresh line is a shell waiting, and a pane in a mode may route keys to tmux instead of the workload. Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted.
Swap the positions of two panes. Change tmux state; no client-supplied executable input.
Hooks1 tool#
List the hooks tmux runs when something happens on the server, such as a pane exiting. This tool does not set hooks. Hooks set through another path remain in their server or session until unset; configuration files persist them across server restarts. Reach for this when tmux does something no tool here asked for. Read configured tmux commands; accepts no client-supplied executable input. Returned values may contain executable configuration.
Options and environment4 tools#
Set the scrollback history limit for a session or its global default. From tmux 3.7 existing panes take it too, and lowering it discards their scrollback past the new limit. Delete tmux state; accepts no command payload.
Set mouse handling for a session or the global session default. Change tmux state; no client-supplied executable input.
List the variables tmux hands to processes it starts, for the server or for one session, and whether each is set or marked for removal. Values are withheld: a tmux server inherits the environment of the shell that started it, tokens and keys included. A value is returned only for a name the operator listed in LIBTMUX_ENVIRONMENT_VALUES at startup, and is then returned in clear. This is not the environment of anything already running: a pane started before a change keeps what it was given. Read the tmux environment; accepts no client-supplied executable input. Values are withheld unless the operator allowed the name.
Read a tmux option, such as history-limit or a user option like @theme. Name the scope the option lives in; global-session is what tmux uses when a command names no target. Read configured tmux commands; accepts no client-supplied executable input. Returned values may contain executable configuration.
Coordination2 tools#
Signal a tmux wait-for channel, releasing every current waiter. With no waiter, one signal is latched; signalling the same channel again clears that latch. Change tmux state; no client-supplied executable input.
Block until something signals a tmux wait-for channel. A pending signal is consumed. Pair this with a shell command that ends in tmux wait-for -S <channel> to synchronise with work this server did not start. Change tmux state; no client-supplied executable input.
Other tools3 tools#
Call a serial batch of at most sixteen enabled inspect tools. One approval for this batch covers every enabled nested name; inner tools do not receive separate client approval. The complete JSON-RPC response line, including its request ID and newline, is capped at 1,000,000 bytes; truncated payloads and omitted bytes are explicit. Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted.
Read a bounded set of tmux variables against one pane. tmux reads a name it does not know as a format from its environment, so a name the server or session environment holds is refused unless the operator listed it in LIBTMUX_ENVIRONMENT_VALUES at startup. Read configured tmux commands; accepts no client-supplied executable input. Returned values may contain executable configuration.
Wait until a pane writes matching text. Reads the pane’s live output stream, so text that scrolls past between checks is still seen. The returned text is that raw stream, not the rendered screen: a line redrawn in place repeats; capture_pane shows the screen. Prefer run_shell_command for commands you are sending yourself: it reports an exit status instead of guessing from output. Use this for output you did not author, such as a server logging that it is ready. A line this server itself types and submits — with send_keys, paste_text, or run_shell_command’s own dispatch — is discounted from a match for a short time afterward, so waiting for text you just sent does not match its own echo; output that happens to repeat the same words still does. A submitted line that wrapped across terminal rows when it was typed is not discounted. A pattern still on the row being typed into, not yet submitted, reports outcome pending instead of matched, and one already on a completed row before this call attached reports present_at_entry. Waiting owns an observer client until the wait ends. Each list accepts at most 32 patterns, each at most 4,096 bytes, using Rust’s linear-time regex engine. 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_TOOLSETSinspect,manage,execute,teardown
Protocol version: 2025-11-25. Download the full protocol catalog.
Source: libtmux/libtmux-rs@84de9258a07d.
The language API reference documents embedding and implementation types.