mobile_set_orientation
Change mobile device screen orientation between portrait and landscape modes for testing and automation purposes.
Instructions
Change the 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. | |
| orientation | Yes | The desired orientation |
Implementation Reference
- src/server.ts:590-594 (handler)Handler function that retrieves the robot for the specified device and calls setOrientation on it.async ({ device, orientation }) => { const robot = getRobotFromDevice(device); await robot.setOrientation(orientation); return `Changed device orientation to ${orientation}`; }
- src/server.ts:586-589 (schema)Zod schema defining the input parameters: device (string) and orientation (enum: portrait or landscape).{ device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."), orientation: z.enum(["portrait", "landscape"]).describe("The desired orientation"), },
- src/server.ts:582-595 (registration)Tool registration call that defines the name, description, schema, and handler for mobile_set_orientation.tool( "mobile_set_orientation", "Set Orientation", "Change the 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."), orientation: z.enum(["portrait", "landscape"]).describe("The desired orientation"), }, async ({ device, orientation }) => { const robot = getRobotFromDevice(device); await robot.setOrientation(orientation); return `Changed device orientation to ${orientation}`; } );