From 74fdbe7c43947218f20b8fbae553f73d2de29059 Mon Sep 17 00:00:00 2001 From: iris Date: Mon, 20 Jul 2026 21:07:55 +0200 Subject: [PATCH] fix(#2618): remove hardcoded resolution from mouse tool descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The display size is not always 1280x720 — it changes when the operator clicks 'match size' in the web UI. Replace the fixed mention with a recommendation to use screenshot first to check the current resolution. --- hive-screen-mcp/src/main.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hive-screen-mcp/src/main.rs b/hive-screen-mcp/src/main.rs index 7f5fa485..8fb7a0ff 100644 --- a/hive-screen-mcp/src/main.rs +++ b/hive-screen-mcp/src/main.rs @@ -255,10 +255,10 @@ impl ScreenMcp { #[tool( description = "Move the mouse cursor to an absolute pixel position on the display. \ - `x` is measured from the left edge, `y` from the top edge. The display is \ - 1280×720 pixels when `hyperhive.gui.enable = true`. Injects a RFB \ - `PointerEvent` into the Weston VNC backend — compositor-mediated, \ - no kernel bypass." + `x` is measured from the left edge, `y` from the top edge. Coordinates are in \ + display pixels — use `screenshot` first to see the current resolution (the \ + display size can vary). Injects a RFB `PointerEvent` into the Weston VNC \ + backend — compositor-mediated, no kernel bypass." )] async fn mouse_move(&self, Parameters(args): Parameters) -> String { let (Ok(x), Ok(y)) = (u16::try_from(args.x), u16::try_from(args.y)) else { @@ -272,10 +272,11 @@ impl ScreenMcp { #[tool( description = "Click a mouse button at an absolute pixel position. `x` and `y` are \ - the target coordinates (0-based from the top-left, display is 1280×720). \ - `button` is `\"left\"` (default), `\"right\"`, or `\"middle\"`. Sends: move \ - to position → button-down → button-up as RFB `PointerEvent` messages to the \ - Weston VNC backend — compositor-mediated, no kernel bypass." + the target coordinates (0-based from the top-left) in display pixels — use \ + `screenshot` first to determine the current resolution (display size can vary). \ + `button` is `\"left\"` (default), `\"right\"`, or `\"middle\"`. Sends: move to \ + position → button-down → button-up as RFB `PointerEvent` messages to the Weston \ + VNC backend — compositor-mediated, no kernel bypass." )] async fn mouse_click(&self, Parameters(args): Parameters) -> String { let (Ok(x), Ok(y)) = (u16::try_from(args.x), u16::try_from(args.y)) else {