mqscript_dim
Define variables or arrays for mobile automation scripts to store and manage data during device control operations.
Instructions
Define variables or arrays
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| variables | Yes | Variable names separated by commas (e.g., "a, b(), c") |
Implementation Reference
- src/tools/basic-commands.ts:371-382 (handler)The handler function that generates an MQScript 'Dim' command for declaring variables and returns a textual response with the generated script.handler: async (args: { variables: string }) => { const { variables } = args; const script = `Dim ${variables}`; return { content: [ { type: 'text', text: `Generated MQScript variable declaration:\n\`\`\`\n${script}\n\`\`\`\n\nThis declares variables: ${variables}.` } ] }; }
- src/tools/basic-commands.ts:361-370 (schema)The input schema validating the 'variables' parameter as a required string.inputSchema: { type: 'object' as const, properties: { variables: { type: 'string', description: 'Variable names separated by commas (e.g., "a, b(), c")' } }, required: ['variables'] },
- src/tools/basic-commands.ts:358-383 (registration)The complete tool definition object within ControlCommands, including name 'mqscript_dim', description, inputSchema, and handler.dimVariable: { name: 'mqscript_dim', description: 'Define variables or arrays', inputSchema: { type: 'object' as const, properties: { variables: { type: 'string', description: 'Variable names separated by commas (e.g., "a, b(), c")' } }, required: ['variables'] }, handler: async (args: { variables: string }) => { const { variables } = args; const script = `Dim ${variables}`; return { content: [ { type: 'text', text: `Generated MQScript variable declaration:\n\`\`\`\n${script}\n\`\`\`\n\nThis declares variables: ${variables}.` } ] }; } }