fix(#2618): remove hardcoded resolution from mouse tool descriptions

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.
This commit is contained in:
iris 2026-07-20 21:07:55 +02:00
commit 74fdbe7c43

View file

@ -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<MouseMoveArgs>) -> 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<MouseClickArgs>) -> String {
let (Ok(x), Ok(y)) = (u16::try_from(args.x), u16::try_from(args.y)) else {