Skip to main content
Glama

capture_pane

Retrieve the visible output from any tmux pane using session:window.pane format. Use after listing sessions, windows, and panes to specify the target. Note: pane output may contain sensitive data; confirm safety before use.

Instructions

Capture current output of a tmux pane. Target format: 'session:window.pane' (e.g. 'work:0.0'). Use list_sessions → list_windows → list_panes to build the target. WARNING: pane output may contain environment variables, API keys, tokens, and credentials — do not call if the pane may contain sensitive data unless the user has confirmed it is safe. AFTER displaying the output, always ask the user what to do next with these options: Refresh (call capture_pane again), Send command (ask what command then call send_keys), Switch pane (restart from list_sessions), Done (stop). Loop until the user picks Done.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesNoLines of scrollback to include (default: 150)
targetYesPane target: 'session:window.pane'
Behavior4/5

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

With no annotations, the description carries full burden. It warns about sensitive output (environment variables, API keys) and instructs asking user what to do next after displaying output. However, it does not explicitly state side effects or idempotency, though the read-only nature is implied.

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?

The description is concise with five sentences, each serving a distinct purpose: purpose, target format, building the target, security warning, and post-capture workflow. It is front-loaded with the most critical information and contains no redundant phrases.

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

Completeness5/5

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

Given no output schema, the description fully covers the tool's behavior: it captures pane output, displays it, and provides a follow-up loop. The security warning addresses a potential risk, and the parameters are well-documented via the schema and clarified examples. All necessary context for an agent to use the tool correctly is present.

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?

Schema coverage is 100% for both parameters. The description adds value beyond the schema by providing the target format example ('work:0.0') and the method to obtain the target via list tools. The 'lines' parameter has a default mentioned in the schema but not repeated in the description.

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 begins with 'Capture current output of a tmux pane', clearly stating the action and resource. It specifies the target format 'session:window.pane' and distinguishes from siblings by referencing how to build the target using list_sessions, list_windows, and list_panes.

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?

Provides explicit guidance: use list_sessions→list_windows→list_panes to build the target, warns against calling on panes with sensitive data without user confirmation, and outlines the post-capture workflow with options (Refresh, Send command, Switch pane, Done).

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/fr1sk/tmux-mcp'

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