Skip to content

Commit 5e52ade

Browse files
committed
mcp(refactor[pipe_pane]): lead docstring with a concrete logging use case
why: 'Start or stop piping pane output to a file.' is accurate but doesn't give the agent the hook it needs to reach for this tool. FastMCP indexes the docstring summary for search and LLM clients feed it into system prompts — a concrete example ('cat > /tmp/pane.log') anchors the discoverability without changing any behavior. what: - Replace the flat two-line summary with 'Log a pane's live output to a file (or stop an active log)' plus a one-sentence typical-use hint. The semantic reframe (log, not pipe) matches how agents think about the affordance.
1 parent 25272a0 commit 5e52ade

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • src/libtmux_mcp/tools/pane_tools

src/libtmux_mcp/tools/pane_tools/pipe.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ def pipe_pane(
2323
window_id: str | None = None,
2424
socket_name: str | None = None,
2525
) -> str:
26-
"""Start or stop piping pane output to a file.
26+
"""Log a pane's live output to a file (or stop an active log).
2727
28-
When output_path is given, starts logging all pane output to the file.
29-
When output_path is None, stops any active pipe for the pane.
28+
Streams everything written to the pane (stdout plus terminal
29+
control sequences) into a file on disk — the common use is
30+
``output_path="/tmp/pane.log"`` to capture scrollback continuously
31+
while the agent watches for errors. When ``output_path`` is given,
32+
starts logging; when ``output_path`` is None, stops any active pipe
33+
for the pane.
3034
3135
.. warning::
3236
This tool writes to arbitrary filesystem paths chosen by the MCP

0 commit comments

Comments
 (0)