MCPconceptTools

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

Concept example A working example of the core library. It can change without notice. What concept means

tool MCP

select_layout

select_layout( layout: string, window: string, )

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.

MCP request method
tools/call Send select_layout as the tool name, with the arguments below.
Wraps
window.Window.select_layoutThe library call this tool makes: crates/tmux-mcp/src/tools/control.rs:573.

Arguments

  • layout (string)

    A saved tmux layout, or a named layout and its unique abbreviation.

    The names are even-horizontal, even-vertical, main-horizontal, main-vertical and tiled. The running daemon determines which names and abbreviations are supported; mirrored main layouts require tmux 3.5.

  • window (string)

    The @-prefixed window to arrange.

No other arguments are accepted.

Result

Returns object

Annotations

Advertised by the server

destructiveHint
false
idempotentHint
true
openWorldHint
false
readOnlyHint
false
title
"Arrange Window Panes"

Capability

Toolset
Manage Change tmux structure or presentation.
Process reach
none
tmux effects
change

The capability row states what this tool reads, changes and reaches; the annotations are as the server advertises them.

Protocol data

Use the complete advertised contract for validation and client integration.

Input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"layout": {
"description": "A saved tmux layout, or a named layout and its unique abbreviation.\n\nThe names are `even-horizontal`, `even-vertical`, `main-horizontal`,\n`main-vertical` and `tiled`. The running daemon determines which names\nand abbreviations are supported; mirrored main layouts require tmux 3.5.",
"type": "string"
},
"window": {
"description": "The `@`-prefixed window to arrange.",
"type": "string"
}
},
"required": [
"window",
"layout"
],
"type": "object"
}
Output schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"layout": {
"description": "The layout it now has, in tmux's own syntax.",
"type": "string"
},
"window": {
"description": "The window that was arranged.",
"type": "string"
}
},
"required": [
"window",
"layout"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference