mobile_get_orientation
Retrieve the current screen orientation of a mobile device for automation testing and interaction purposes.
Instructions
Get the current screen orientation of the device
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | The device identifier to use. Use mobile_list_available_devices to find which devices are available to you. |
Implementation Reference
- src/server.ts:597-609 (handler)The handler and registration for the mobile_get_orientation tool. It retrieves the device robot and calls getOrientation() on it, returning the current orientation.tool( "mobile_get_orientation", "Get Orientation", "Get the current screen orientation of the device", { device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.") }, async ({ device }) => { const robot = getRobotFromDevice(device); const orientation = await robot.getOrientation(); return `Current device orientation is ${orientation}`; } );