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

libtmux_mcp.tools.session_tools.create_window

Python
  • Python
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

API reference · Markdown

libtmux_mcp.tools.session_tools.create_window ( session_name : str | None = None , session_id : str | None = None , window_name : str | None = None , start_directory : str | None = None , attach : bool = False , direction : t.Literal["before", "after"] | None = None , socket_name : str | None = None , environment : dict[str, str] | str | None = None , suppress_persistent_history : bool = False ) → WindowInfo
function [source]
function [source]
libtmux_mcp.tools.session_tools.create_window

Create a new window in a tmux session.

Creates a window with one pane. Use split_window to add more panes afterward.

Parameters
  • session_name ( str | None ) – Session name to look up.

  • session_id ( str | None ) – Session ID (e.g. '$1') to look up.

  • window_name ( str | None ) – Name for the new window.

  • start_directory ( str | None ) – Existing directory to start in. ~ expands; a relative path resolves against the MCP server process's directory.

  • attach ( bool ) – Whether to make the new window active.

  • direction ( t.Literal["before", "after"] | None ) – Window placement direction.

  • socket_name ( str | None ) – tmux socket name. Defaults to LIBTMUX_SOCKET env var.

  • environment ( dict[str, str] | str | None ) – Per-process environment as a mapping or JSON object string. Values do not modify the tmux session environment. Each item becomes a tmux -e launch option. Values may be visible to host process inspection in the tmux client argv during launch and in the child environment afterward; MCP audit redaction does not hide either surface. Pass credential references, not literal credentials.

  • suppress_persistent_history ( bool ) – Whether to suppress persistent history for the spawned shell. Defaults to False for MCP and direct Python calls. This per-call option does not inherit LIBTMUX_SUPPRESS_HISTORY. Startup files may override these controls.

Returns

WindowInfo Serialized window object.

Esc

Type to search.