Skip to main content
Glama

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
NameRequiredDescriptionDefault
xYesX coordinate
yYesY coordinate

Implementation Reference

  • 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,
        };
      }
  • 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',
Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scenic-contrib/scenic_mcp_experimental'

If you have feedback or need assistance with the MCP directory API, please join our Discord server