Skip to main content
Glama

Capture pane output

capture
Read-only

Read the last lines of a tmux session pane, optionally preserving ANSI escapes, to inspect recent terminal output without modifying the session.

Instructions

Return the last lines of a session pane, with optional ANSI escapes. Read-only. Defaults to the owned session "mcp" if it exists.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "capture"
  }
}

Input Schema

NameRequiredDescriptionDefault
ansiNoPreserve ANSI escape sequences
linesNoMaximum lines (default: 200)
sessionNoTarget session (default: owned session "mcp")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the description's "Read-only" is restated rather than additive. It does add the useful defaulting rule (targets the owned session "mcp" if it exists), but says nothing about whether capture consumes or truncates scrollback, whether it blocks, or what the returned shape looks like.

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

Conciseness4/5

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

Two short sentences, front-loaded with what is returned, then the safety profile and default. There is minor waste in repeating "Read-only" that the annotations already convey.

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

Completeness3/5

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

For a simple no-output-schema read tool this is close to adequate, but without an output schema the description should say something about the return format (string block vs. line array, how truncation is signaled). That gap matters when callers must parse the result.

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 100%, so all three parameters are already documented with defaults and bounds. The description only adds a nuance the schema lacks — that the default session is used "if it exists" — and restates the optional ANSI behavior; the baseline of 3 is appropriate.

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

Purpose4/5

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

States a specific verb and resource ("Return the last lines of a session pane") with an explicit option (ANSI escapes). It is clear what the tool does, but it never names or contrasts with siblings such as exec or list_sessions, leaving the read-vs-execute boundary implicit.

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

Usage Guidelines3/5

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

The only usage cue is "Read-only" plus the default-session note, which implies this is the way to inspect pane output rather than run commands. There is no explicit when-to-use or when-not-to-use guidance versus exec or list_sessions, so the agent must infer the selection.

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