tmux_split_window
Split tmux terminal windows horizontally or vertically to create new panes for parallel command execution and terminal automation.
Instructions
Split the current window in a tmux session horizontally or vertically to create a new pane.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_name | Yes | Name of the tmux session | |
| vertical | No | If true, split vertically (side by side). If false, split horizontally (top and bottom). Default: false |
Implementation Reference
- src/index.js:381-406 (handler)Handler function that splits the tmux window horizontally or vertically based on the vertical parameter using tmux split-window command.async splitWindow(args) { const { session_name, vertical = false } = args; try { let cmd = `tmux split-window -t "${session_name}"`; if (vertical) { cmd += " -h"; // horizontal split creates vertical panes (side by side) } await execAsync(cmd); return { content: [ { type: "text", text: `Split window in session ${session_name} (${ vertical ? "vertically" : "horizontally" })`, }, ], }; } catch (error) { throw new Error(`Failed to split window: ${error.message}`); } }
- src/index.js:133-147 (schema)Input schema defining parameters for the tmux_split_window tool: session_name (required string), vertical (optional boolean).inputSchema: { type: "object", properties: { session_name: { type: "string", description: "Name of the tmux session", }, vertical: { type: "boolean", description: "If true, split vertically (side by side). If false, split horizontally (top and bottom). Default: false", }, }, required: ["session_name"], },
- src/index.js:129-148 (registration)Tool registration in the ListTools response, including name, description, and input schema.{ name: "tmux_split_window", description: "Split the current window in a tmux session horizontally or vertically to create a new pane.", inputSchema: { type: "object", properties: { session_name: { type: "string", description: "Name of the tmux session", }, vertical: { type: "boolean", description: "If true, split vertically (side by side). If false, split horizontally (top and bottom). Default: false", }, }, required: ["session_name"], }, },
- src/index.js:201-202 (registration)Dispatch case in the CallToolRequestHandler switch statement that routes to the splitWindow handler.case "tmux_split_window": return await this.splitWindow(args);