MCPpre-alphaTools

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

In development Server behavior and tool contracts may change. Tool availability depends on the server configuration.

tool MCP

select_pane

select_pane( direction?: "up" | "down" | "left" | "right" | "last" | "next" | "previous" | null, pane_id?: string | null, session_id?: string | null, session_name?: string | null, socket_name?: string | null, window_id?: string | null, window_index?: string | null, )

Select (focus) a tmux pane by ID or direction.

Use this to navigate between panes. Provide either pane_id for direct selection, or direction for relative navigation within a window.

MCP request method
tools/call Send select_pane as the tool name, with the arguments below.
Wraps
libtmux.Pane.selectThe library call this tool makes: src/libtmux_mcp/tools/pane_tools/layout.py:134.

Arguments

No other arguments are accepted.

Result

Returns object

Annotations

Advertised by the server

destructiveHint
true
idempotentHint
false
openWorldHint
true
readOnlyHint
false

Capability

Toolset
Manage Change tmux structure or presentation.

Every Python tool advertises the same annotations, so a host that approves by annotation cannot tell tools apart. The capability row is what tells them apart.

Protocol data

Use the complete advertised contract for validation and client integration.

Input schema
{
"additionalProperties": false,
"properties": {
"direction": {
"anyOf": [
{
"enum": [
"up",
"down",
"left",
"right",
"last",
"next",
"previous"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Relative direction: 'up', 'down', 'left', 'right', 'last'\n(previously active), 'next', or 'previous'."
},
"pane_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Pane ID (e.g. '%1') for direct selection."
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Session ID for resolution."
},
"session_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Session name for resolution."
},
"socket_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "tmux socket name."
},
"window_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Window ID for directional navigation scope."
},
"window_index": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Window index for directional navigation scope."
}
},
"type": "object"
}
Output schema
{
"description": "Serialized tmux pane.",
"properties": {
"is_caller": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "MCP caller identity for this pane. ``True`` when the pane matches the caller's ``TMUX_PANE`` *and* lives on the same tmux socket as the caller's ``TMUX`` (verified via socket realpath); ``False`` otherwise, including the case where the pane id matches but the socket does not or cannot be proven to; ``None`` when the MCP process is not running inside tmux at all."
},
"pane_active": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Active flag ('1' or '0')"
},
"pane_at_bottom": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "True when the pane touches the window's bottom edge."
},
"pane_at_left": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "True when the pane touches the window's left edge."
},
"pane_at_right": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "True when the pane touches the window's right edge."
},
"pane_at_top": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "True when the pane touches the window's top edge. tmux accounts for ``pane-border-status`` here, so the top row may be 1 instead of 0 when the status bar is at the top."
},
"pane_bottom": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Bottom edge row (inclusive), window-relative."
},
"pane_current_command": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Running command"
},
"pane_current_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Current working directory"
},
"pane_height": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Height in rows"
},
"pane_id": {
"description": "Pane ID (e.g. '%1')",
"type": "string"
},
"pane_index": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Pane index"
},
"pane_left": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Left edge column, 0-based and window-relative."
},
"pane_pid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Process ID"
},
"pane_right": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Right edge column (inclusive), window-relative."
},
"pane_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Pane title"
},
"pane_top": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Top edge row, 0-based and window-relative."
},
"pane_tty": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "TTY device path of the pane (e.g. '/dev/pts/5')."
},
"pane_width": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Width in columns"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Parent session ID"
},
"window_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Parent window ID"
}
},
"required": [
"pane_id"
],
"type": "object"
}
Esc
Search in

Type to search.

Reference previewOpen reference