mqscript_device_getinfo
Retrieve specific device details such as model, brand, version, screen dimensions, or DPI for mobile automation scripting and device control.
Instructions
Get device information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| infoType | No | Type of device info to get | model |
| resultVariable | No | Variable name to store result | deviceInfo |
Implementation Reference
- src/tools/extension-commands.ts:155-166 (handler)Handler that destructures arguments, generates MQScript `Device.GetInfo` command string, and returns a formatted text response with the script.handler: async (args: { infoType?: string; resultVariable?: string }) => { const { infoType = 'model', resultVariable = 'deviceInfo' } = args; const script = `${resultVariable} = Device.GetInfo("${infoType}")`; return { content: [ { type: 'text', text: `Generated MQScript get device info command:\n\`\`\`\n${script}\n\`\`\`\n\nThis gets device ${infoType} and stores it in variable "${resultVariable}".` } ] }; }
- Input schema defining optional infoType (enum: model, brand, etc.) and resultVariable parameters for the tool.inputSchema: { type: 'object' as const, properties: { infoType: { type: 'string', description: 'Type of device info to get', enum: ['model', 'brand', 'version', 'screenWidth', 'screenHeight', 'dpi'], default: 'model' }, resultVariable: { type: 'string', description: 'Variable name to store result', default: 'deviceInfo' } }, required: [] },
- src/index.ts:52-52 (registration)Spreading DeviceCommands into ALL_TOOLS object, which registers all tools including mqscript_device_getinfo for MCP server handling....DeviceCommands,
- src/index.ts:15-15 (registration)Import of DeviceCommands containing the mqscript_device_getinfo tool definition.import { ElementCommands, DeviceCommands, PhoneCommands, SysCommands } from './tools/extension-commands.js';