mqscript_delay
Pause mobile automation script execution for a specified duration in milliseconds to control timing between operations.
Instructions
Pause script execution for specified duration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| milliseconds | Yes | Delay duration in milliseconds |
Implementation Reference
- src/tools/basic-commands.ts:220-231 (handler)The handler function that executes the tool logic, generating an MQScript 'Delay' command based on the provided milliseconds and returning a formatted response.handler: async (args: { milliseconds: number }) => { const { milliseconds } = args; const script = `Delay ${milliseconds}`; return { content: [ { type: 'text', text: `Generated MQScript delay command:\n\`\`\`\n${script}\n\`\`\`\n\nThis will pause execution for ${milliseconds}ms (${milliseconds/1000} seconds).` } ] }; }
- src/tools/basic-commands.ts:210-219 (schema)The input schema defining the tool's parameters: a required 'milliseconds' number.inputSchema: { type: 'object' as const, properties: { milliseconds: { type: 'number', description: 'Delay duration in milliseconds' } }, required: ['milliseconds'] },
- src/tools/basic-commands.ts:207-232 (registration)The tool registration within ControlCommands object, defining name, description, schema, and handler. This object is spread into the ALL_TOOLS registry in src/index.ts.delay: { name: 'mqscript_delay', description: 'Pause script execution for specified duration', inputSchema: { type: 'object' as const, properties: { milliseconds: { type: 'number', description: 'Delay duration in milliseconds' } }, required: ['milliseconds'] }, handler: async (args: { milliseconds: number }) => { const { milliseconds } = args; const script = `Delay ${milliseconds}`; return { content: [ { type: 'text', text: `Generated MQScript delay command:\n\`\`\`\n${script}\n\`\`\`\n\nThis will pause execution for ${milliseconds}ms (${milliseconds/1000} seconds).` } ] }; } },