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,
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a UI interaction but doesn't specify what 'click' entails (e.g., single click, requires element visibility, potential side effects like navigation), leaving the agent to guess about behavior and risks.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with 'Click on UI element', a single sentence that is front-loaded and wastes no words. It efficiently conveys the core action, though it may be overly brief for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a UI interaction tool with no annotations and no output schema, the description is incomplete. It doesn't explain what happens after the click (e.g., page change, error handling) or provide enough context for safe and effective use, leaving significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with 'elementId' clearly documented as 'Element ID or selector'. The description adds no additional meaning beyond this, so it meets the baseline of 3 for adequate but no extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Click on UI element' states a clear action (click) and target (UI element), but it's vague about scope and doesn't differentiate from sibling tools like 'mqscript_tap' or 'mqscript_touch' which likely perform similar UI interactions. It provides a basic purpose but lacks specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers no guidance on when to use this tool versus alternatives such as 'mqscript_tap' or 'mqscript_touch', nor does it mention any prerequisites or context for usage. It's a generic statement with no usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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