Skip to content

Commit 624f1ee

Browse files
committed
fix(tools): Use ANNOTATIONS_CREATE for enter_copy_mode
why: ANNOTATIONS_MUTATING advertises idempotentHint=True, but enter_copy_mode accepts a scroll_up parameter that, when set to an integer, accumulates scroll across invocations — calling enter_copy_mode(scroll_up=50) twice scrolls 100 lines, not 50. That path is non-idempotent, so the hint should reflect the upper bound of behavior. ANNOTATIONS_CREATE (idempotentHint=False) is the safer and more accurate classification, matching send_keys, paste_text, pipe_pane, and swap_pane — all of which are non-idempotent in their primary use cases. exit_copy_mode remains ANNOTATIONS_MUTATING: exiting copy mode while already out of it is a tmux no-op, so repeated invocations converge on the same state. what: - Switch enter_copy_mode registration from ANNOTATIONS_MUTATING to ANNOTATIONS_CREATE in pane_tools.register(). Tag remains TAG_MUTATING.
1 parent 71cc5cf commit 624f1ee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/libtmux_mcp/tools/pane_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ def register(mcp: FastMCP) -> None:
12851285
)
12861286
mcp.tool(
12871287
title="Enter Copy Mode",
1288-
annotations=ANNOTATIONS_MUTATING,
1288+
annotations=ANNOTATIONS_CREATE,
12891289
tags={TAG_MUTATING},
12901290
)(enter_copy_mode)
12911291
mcp.tool(

0 commit comments

Comments
 (0)