Commit b20d651
committed
mcp(fix[pane_tools]): document capture_pane truncation marker for agents
When ``capture_pane`` truncates, the returned string is prefixed with a
literal ``[... truncated K lines ...]`` first line so the caller can
detect the cap. This is documented in the function docstring at
``pane_tools/io.py:174-178``, but FastMCP only surfaces the
``description=`` override registered at ``pane_tools/__init__.py:83-95``,
not the docstring — and the override only said "tail-preserving
truncation at max_lines, default 500". Agents reading the description
had no signal that the first line of a truncated response is a marker
rather than terminal content, and could mishandle the output.
Extends the override to name the marker and tell the agent it's a
literal prefix line to skip when parsing. Also surfaces the
``max_lines=None`` opt-out.
Test: adds a row to ``test_tool_description_includes`` asserting
``capture_pane``'s description contains ``"truncated"``. The contract
suite already pinned ``snapshot_pane`` / ``wait_for_text`` /
``search_panes`` cross-references; this extends the same drift
guard to the truncation behavior.1 parent d14d48f commit b20d651
2 files changed
Lines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
405 | 410 | | |
406 | 411 | | |
407 | 412 | | |
| |||
0 commit comments