Models

Pydantic models for MCP tool inputs and outputs.

class libtmux_mcp.models.SessionInfo
class libtmux_mcp.models.SessionInfo

Bases: BaseModel

Serialized tmux session.

class libtmux_mcp.models.WindowInfo
class libtmux_mcp.models.WindowInfo

Bases: BaseModel

Serialized tmux window.

class libtmux_mcp.models.PaneInfo
class libtmux_mcp.models.PaneInfo

Bases: BaseModel

Serialized tmux pane.

class libtmux_mcp.models.PaneContentMatch
class libtmux_mcp.models.PaneContentMatch

Bases: BaseModel

A pane whose captured content matched a search pattern.

class libtmux_mcp.models.ServerInfo
class libtmux_mcp.models.ServerInfo

Bases: BaseModel

Serialized tmux server info.

class libtmux_mcp.models.OptionResult
class libtmux_mcp.models.OptionResult

Bases: BaseModel

Result of a show_option call.

class libtmux_mcp.models.OptionSetResult
class libtmux_mcp.models.OptionSetResult

Bases: BaseModel

Result of a set_option call.

class libtmux_mcp.models.EnvironmentResult
class libtmux_mcp.models.EnvironmentResult

Bases: BaseModel

Result of a show_environment call.

class libtmux_mcp.models.EnvironmentSetResult
class libtmux_mcp.models.EnvironmentSetResult

Bases: BaseModel

Result of a set_environment call.

class libtmux_mcp.models.WaitForTextResult
class libtmux_mcp.models.WaitForTextResult

Bases: BaseModel

Result of waiting for text to appear in a pane.

class libtmux_mcp.models.PaneSnapshot
class libtmux_mcp.models.PaneSnapshot

Bases: BaseModel

Rich screen capture with metadata: content, cursor, mode, and scroll state.

class libtmux_mcp.models.SearchPanesResult
class libtmux_mcp.models.SearchPanesResult

Bases: BaseModel

Paginated result of search_panes().

Wrapping the match list lets us surface bounded-output information that a bare list[PaneContentMatch] cannot: whether pagination truncated the result set, which panes were skipped, and the offset/limit that produced this page. Agents can re-request with a higher offset to retrieve subsequent pages.

class libtmux_mcp.models.HookEntry
class libtmux_mcp.models.HookEntry

Bases: BaseModel

One entry in a tmux hook array.

Hooks like session-renamed are arrays — they can have multiple commands registered at sparse indices. HookEntry flattens one index+command pair into a serialisable row.

class libtmux_mcp.models.HookListResult
class libtmux_mcp.models.HookListResult

Bases: BaseModel

Structured result of show_hooks() / show_hook().

Flat list of HookEntry instances so MCP clients can iterate without caring whether the underlying tmux hook is scalar or array- shaped.

class libtmux_mcp.models.BufferRef
class libtmux_mcp.models.BufferRef

Bases: BaseModel

Handle returned by load_buffer() for later buffer operations.

Agent-created tmux paste buffers are namespaced with a per-call UUID to avoid collisions on the server-global buffer namespace when concurrent agents (or parallel tool calls from a single agent) are staging content. Callers must use the buffer_name this model carries on subsequent paste_buffer / show_buffer / delete_buffer calls.

class libtmux_mcp.models.BufferContent
class libtmux_mcp.models.BufferContent

Bases: BaseModel

Structured result of show_buffer().

class libtmux_mcp.models.ContentChangeResult
class libtmux_mcp.models.ContentChangeResult

Bases: BaseModel

Result of waiting for any screen content change.