Skip to main content
Glama

move_mouse

Move the mouse cursor to specific screen coordinates on macOS for desktop automation tasks.

Instructions

Move the mouse cursor to the specified screen coordinates without clicking. Do not narrate visual observations or coordinate calculations. Brief task progress updates are acceptable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX coordinate in screen pixels (may be negative for secondary displays)
yYesY coordinate in screen pixels (may be negative for secondary displays)

Implementation Reference

  • Handler function for move_mouse tool.
    /** Handle move_mouse tool call. */
    async function handleMoveMouse(
      args: Record<string, unknown>,
    ): Promise<CallToolResult> {
      const parsed = MoveMouseInputSchema.parse(args);
    
      const result = await runInputHelper("move", { x: parsed.x, y: parsed.y });
    
      const response: Record<string, unknown> = {
        moved_to: { x: parsed.x, y: parsed.y },
      };
      if (typeof result.warning === "string") {
        response.warning = result.warning;
      }
    
      return {
        content: [{ type: "text" as const, text: JSON.stringify(response) }],
      };
    }
  • Input schema for move_mouse tool.
    const MoveMouseInputSchema = z.object({
      x: z
        .number()
        .int()
        .describe(
          "X coordinate in screen pixels (may be negative for secondary displays)",
        ),
      y: z
        .number()
        .int()
        .describe(
          "Y coordinate in screen pixels (may be negative for secondary displays)",
        ),
    });
  • Registration of move_mouse tool.
    {
      name: "move_mouse",
      description: `Move the mouse cursor to the specified screen coordinates without clicking. ${SILENT_HINT}`,
      inputSchema: zodToToolInputSchema(MoveMouseInputSchema),
      annotations: {
        readOnlyHint: false,
        destructiveHint: false,
      },
    },

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/antbotlab/mac-use-mcp'

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