Skip to content

Commit 71cc5cf

Browse files
committed
fix(tools): Use ANNOTATIONS_CREATE for swap_pane
why: ANNOTATIONS_MUTATING advertises idempotentHint=True, but `swap_pane(A, B)` is a toggle — calling it twice swaps the panes back to their original positions, so repeated invocations do NOT converge on a single state. Per the MCP annotation semantics defined in src/libtmux_mcp/_utils.py (L55-66), non-idempotent operations belong in ANNOTATIONS_CREATE (idempotentHint=False). This matches the precedent already established on this branch for send_keys, paste_text, and (commit 0df675f) pipe_pane. what: - Switch swap_pane registration from ANNOTATIONS_MUTATING to ANNOTATIONS_CREATE in pane_tools.register(). Tag remains TAG_MUTATING.
1 parent 052079d commit 71cc5cf

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
@@ -1274,7 +1274,7 @@ def register(mcp: FastMCP) -> None:
12741274
mcp.tool(
12751275
title="Select Pane", annotations=ANNOTATIONS_MUTATING, tags={TAG_MUTATING}
12761276
)(select_pane)
1277-
mcp.tool(title="Swap Pane", annotations=ANNOTATIONS_MUTATING, tags={TAG_MUTATING})(
1277+
mcp.tool(title="Swap Pane", annotations=ANNOTATIONS_CREATE, tags={TAG_MUTATING})(
12781278
swap_pane
12791279
)
12801280
mcp.tool(title="Pipe Pane", annotations=ANNOTATIONS_CREATE, tags={TAG_MUTATING})(

0 commit comments

Comments
 (0)