Models

Pydantic models for MCP tool inputs and outputs.

class libtmux_mcp.models.SessionInfo[source]

Bases: BaseModel

Serialized tmux session.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

session_id: str
session_name: str | None
window_count: int
session_attached: str | None
session_created: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class libtmux_mcp.models.WindowInfo[source]

Bases: BaseModel

Serialized tmux window.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

window_id: str
window_name: str | None
window_index: str | None
session_id: str | None
session_name: str | None
pane_count: int
window_layout: str | None
window_active: str | None
window_width: str | None
window_height: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class libtmux_mcp.models.PaneInfo[source]

Bases: BaseModel

Serialized tmux pane.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

pane_id: str
pane_index: str | None
pane_width: str | None
pane_height: str | None
pane_current_command: str | None
pane_current_path: str | None
pane_pid: str | None
pane_title: str | None
pane_active: str | None
window_id: str | None
session_id: str | None
is_caller: bool | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class libtmux_mcp.models.PaneContentMatch[source]

Bases: BaseModel

A pane whose captured content matched a search pattern.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

pane_id: str
pane_current_command: str | None
pane_current_path: str | None
window_id: str | None
window_name: str | None
session_id: str | None
session_name: str | None
matched_lines: list[str]
is_caller: bool | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class libtmux_mcp.models.ServerInfo[source]

Bases: BaseModel

Serialized tmux server info.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

is_alive: bool
socket_name: str | None
socket_path: str | None
session_count: int
version: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class libtmux_mcp.models.OptionResult[source]

Bases: BaseModel

Result of a show_option call.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

option: str
value: t.Any
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class libtmux_mcp.models.OptionSetResult[source]

Bases: BaseModel

Result of a set_option call.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

option: str
value: str
status: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class libtmux_mcp.models.EnvironmentResult[source]

Bases: BaseModel

Result of a show_environment call.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

variables: dict[str, str | bool]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class libtmux_mcp.models.EnvironmentSetResult[source]

Bases: BaseModel

Result of a set_environment call.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

name: str
value: str
status: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class libtmux_mcp.models.WaitForTextResult[source]

Bases: BaseModel

Result of waiting for text to appear in a pane.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

found: bool
matched_lines: list[str]
pane_id: str
elapsed_seconds: float
timed_out: bool
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].