Skip to content

Commit 052079d

Browse files
committed
docs(tools): Correct snapshot_pane title example and document pipe_pane stop-case
why: Two result examples in docs/tools/panes.md drifted from the code: 1. snapshot_pane showed "title": "" but the tool coerces any falsy title value to None via `title=parts[8] if parts[8] else None` in pane_tools.py — so "" is literally unreachable and the only truthful values are a non-empty string or null. Verified with a live probe against a fresh pane (surfaced "title": "d", tmux's default). Readers copying the example would have serialized data that could never arrive over MCP. 2. pipe_pane only documented the start-case response string. The side-effects paragraph tells readers to call with output_path=null to stop, but no example showed the `"Piping stopped for pane %0"` response that the tool returns in that branch (pane_tools.py:970). Agents toggling the pipe had to guess the return shape. what: - Flip snapshot_pane's example title value from "" to null. - Extend the pipe_pane section with a second example showing the output_path=null call and its corresponding "Piping stopped ..." response string. No code changes; all existing result shapes verified against src/libtmux_mcp/models.py, the _utils.py serializers, and each tool's return path. Only these two examples needed correction.
1 parent 82c6330 commit 052079d

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

docs/tools/panes.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Response:
223223
"pane_mode": null,
224224
"scroll_position": null,
225225
"history_size": 142,
226-
"title": "",
226+
"title": null,
227227
"pane_current_command": "zsh",
228228
"pane_current_path": "/home/user/myproject",
229229
"is_caller": null
@@ -576,12 +576,30 @@ with `start`/`end` to read scrollback.
576576
}
577577
```
578578

579-
Response (string):
579+
Response (start):
580580

581581
```text
582582
Piping pane %0 to /tmp/build.log
583583
```
584584

585+
**Stopping the pipe:**
586+
587+
```json
588+
{
589+
"tool": "pipe_pane",
590+
"arguments": {
591+
"pane_id": "%0",
592+
"output_path": null
593+
}
594+
}
595+
```
596+
597+
Response (stop):
598+
599+
```text
600+
Piping stopped for pane %0
601+
```
602+
585603
```{fastmcp-tool-input} pane_tools.pipe_pane
586604
```
587605

0 commit comments

Comments
 (0)