Skip to main content
Glama
laszlopere

mcp-tmux

by laszlopere

tmux_wait_for_text

Read-only

Monitor a tmux pane and pause execution until a specified substring or regex pattern appears, with configurable timeout.

Instructions

Wait until pattern appears in a pane, or timeout seconds elapse.

pattern is a substring by default, or a regular expression when regex=True. history optionally includes that many scrollback lines in each check (-S -history). Returns {"matched", "elapsed", "content"} where content is the last capture taken.

Caveat: the pane also shows the command you typed, so a pattern can match your own echoed input line rather than the command's output. To wait for a command to finish and get just its output, prefer tmux_run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_paneYes
patternYes
timeoutNo
regexNo
historyNo
poll_intervalNo
targetNo
Behavior4/5

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

Beyond readOnlyHint annotation, description discloses return format {matched, elapsed, content}, history capability, and the caveat about matching echoed input. Adds significant behavioral context.

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?

Four sentences, front-loaded with core purpose and parameter list. No redundant words; every sentence adds value. Well-structured.

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 main parameters and return values, but omits details on poll_interval and target. For a 7-parameter tool with no output schema, it's fairly complete but could be slightly more comprehensive.

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

Parameters3/5

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

Schema coverage is 0%, so description must compensate. It explains pattern (substring vs regex), timeout, regex flag, and history. However, poll_interval and target are not described, leaving gaps. Partial compensation earns a 3.

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?

The description clearly states the tool waits for a pattern to appear or timeout, with specific verb 'Wait' and resource 'pane'. It distinguishes from siblings like tmux_capture_pane or tmux_run by noting to prefer tmux_run for waiting for command completion.

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

Usage Guidelines5/5

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

Explicitly tells when to use an alternative: 'To wait for a command to *finish* and get just its output, prefer `tmux_run`.' Also warns about the caveat of matching echoed input, providing clear usage context.

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