Skip to main content
Glama
mobile-next

Mobile Next MCP Server

Official
by mobile-next

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
NameRequiredDescriptionDefault
deviceYesThe device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
orientationYesThe desired orientation

Implementation Reference

  • 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}`; }
  • 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}`; } );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mobile-next/mobile-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server