send_mouse_move
Move the mouse cursor to precise coordinates (x, y) using Scenic MCP for AI-driven automation and testing of Scenic Elixir applications.
Instructions
Move mouse cursor to specific coordinates
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | X coordinate | |
| y | Yes | Y coordinate |
Implementation Reference
- src/tools.ts:372-428 (handler)The handler function that checks connection, constructs the mouse move command with x and y coordinates, sends it to the Elixir/Scenic backend via conn.sendToElixir, parses response, and returns success or error message.async function handleSendMouseMove(args: any) { try { const isRunning = await conn.checkTCPServer(); if (!isRunning) { return { content: [ { type: 'text', text: 'Cannot send mouse move: No Scenic application connected.\n\nStart your Scenic application first.', }, ], isError: false, }; } const { x, y } = args; const command = { action: 'send_mouse_move', x, y, }; const response = await conn.sendToElixir(command); const data = JSON.parse(response); if (data.error) { return { content: [ { type: 'text', text: `Error moving mouse: ${data.error}`, }, ], isError: true, }; } return { content: [ { type: 'text', text: `Mouse moved to (${x}, ${y})`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error moving mouse: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; }
- src/tools.ts:71-88 (schema)The tool schema defining the name, description, and input schema requiring x and y numeric coordinates.{ name: 'send_mouse_move', description: 'CURSOR MOVEMENT: Move the mouse cursor to specific coordinates. Useful for hover effects, precise positioning before clicking, and testing mouse-over interactions.', inputSchema: { type: 'object', properties: { x: { type: 'number', description: 'X coordinate', }, y: { type: 'number', description: 'Y coordinate', }, }, required: ['x', 'y'], }, },
- src/tools.ts:196-197 (registration)The switch case in the tool handler router that dispatches calls to 'send_mouse_move' to the handleSendMouseMove function.case 'send_mouse_move': return await handleSendMouseMove(args);
- src/tools.ts:72-72 (registration)The tool name registration within the getToolDefinitions array.name: 'send_mouse_move',