Skip to main content
Glama
laszlopere

mcp-tmux

by laszlopere

tmux_stream_start

Start a persistent tmux control stream to capture pane output and window events for a session, with automatic reconnection on drop.

Instructions

Open (or reuse) a control-mode stream attached to session.

Starts a persistent tmux -C attach -t <session> connection that captures pane output and window/layout events. Idempotent per (target, session). Returns {"stream_id", "session", "target", "alive"}; pass the stream_id to tmux_stream_read/_send/_stop.

Pass width/height (both, tmux 2.4+) to set the control client's size via refresh-client -C WxH right after attach — otherwise it defaults to 80x24 and wraps %output for wider panes oddly. The size is re-applied automatically if the connection drops and reconnects; tmux_stream_resize changes it later. The connection also auto-reconnects on an unexpected drop (e.g. a flaky SSH link), surfacing reconnected/disconnected events in the stream.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionYes
targetNo
widthNo
heightNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, description covers key behaviors: persistent connection, idempotency, auto-reconnect, event capture, size re-application. Does not mention prerequisites like session existence or potential failure modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two paragraphs, each sentence earns its place. Front-loaded with purpose, then behavior, then parameter details. No unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers return format, idempotency, auto-reconnect, and size behavior. No output schema, but description explains return value. Could mention potential limits on number of streams, but overall complete for a stream initialization tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds significant meaning beyond input schema: explains session is required, width/height together set client size, default 80x24, and target is optional. Schema coverage is 0%, so description compensates well, though target could be clarified.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Open (or reuse) a control-mode stream attached to session.' It specifies the verb (open/reuse) and resource (stream). Idempotency note and distinction from sibling stream tools (read, send, stop) enhance clarity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context for when to use (starting a stream, setting size with width/height), and mentions subsequent tools (read, send, stop). However, lacks explicit when-not-to-use or alternative tools for similar tasks.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/laszlopere/mcp-tmux'

If you have feedback or need assistance with the MCP directory API, please join our Discord server