Skip to main content
Glama
allegiant

MQScript MCP Server

by allegiant

mqscript_element_click

Simulate user clicks on mobile UI elements by specifying element IDs or selectors for automated testing and interaction.

Instructions

Click on UI element

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementIdYesElement ID or selector

Implementation Reference

  • The handler function for the 'mqscript_element_click' tool. It takes an elementId, generates the corresponding MQScript 'Element.Click' command, and returns a formatted response with the script.
    handler: async (args: { elementId: string }) => { const { elementId } = args; const script = `Element.Click("${elementId}")`; return { content: [ { type: 'text', text: `Generated MQScript element click command:\n\`\`\`\n${script}\n\`\`\`\n\nThis clicks on element "${elementId}".` } ] }; }
  • Input schema for the 'mqscript_element_click' tool, defining the required 'elementId' parameter.
    inputSchema: { type: 'object' as const, properties: { elementId: { type: 'string', description: 'Element ID or selector' } }, required: ['elementId'] },
  • src/index.ts:32-61 (registration)
    The tool is registered by spreading ElementCommands into the ALL_TOOLS object, which is used by the MCP server's ListTools and CallTool handlers.
    const ALL_TOOLS = { // Basic Commands - 基础命令 ...TouchCommands, ...ControlCommands, ...ColorCommands, ...OtherCommands, // Standard Library - 标准库函数 ...MathFunctions, ...StringFunctions, ...TypeConversionFunctions, ...ArrayFunctions, // UI Commands - 界面命令 ...UIControlCommands, ...UIPropertyCommands, ...FloatingWindowCommands, // Extension Commands - 扩展命令 ...ElementCommands, ...DeviceCommands, ...PhoneCommands, ...SysCommands, // Plugin Commands - 插件命令 ...CJsonCommands, ...DateTimeCommands, ...FileCommands, ...TuringCommands, };

Other 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/allegiant/MQScript_MCP'

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