Skip to main content
Glama

mobile_use_device

Select and configure a specific mobile device or simulator for testing and automation tasks. Supports Android, iOS, and simulator environments to streamline mobile application workflows.

Instructions

Select a device to use. This can be a simulator or an Android device. Use the list_available_devices tool to get a list of available devices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceYesThe name of the device to select
deviceTypeYesThe type of device to select

Implementation Reference

  • src/server.ts:187-209 (registration)
    Registration of the 'mobile_use_device' tool including its description, Zod input schema (device and deviceType), and inline handler function that sets the current robot based on the device type by calling constructors or getting simulator.
    tool( "mobile_use_device", "Select a device to use. This can be a simulator or an Android device. Use the list_available_devices tool to get a list of available devices.", { device: z.string().describe("The name of the device to select"), deviceType: z.enum(["simulator", "ios", "android"]).describe("The type of device to select"), }, async ({ device, deviceType }) => { switch (deviceType) { case "simulator": robot = simulatorManager.getSimulator(device); break; case "ios": robot = new IosRobot(device); break; case "android": robot = new AndroidRobot(device); break; } return `Selected device: ${device}`; } );
  • The handler function executes the tool logic: switches on deviceType to create or get the appropriate Robot instance (Simctl for simulator, IosRobot, AndroidRobot) and assigns it to the global 'robot' variable.
    async ({ device, deviceType }) => { switch (deviceType) { case "simulator": robot = simulatorManager.getSimulator(device); break; case "ios": robot = new IosRobot(device); break; case "android": robot = new AndroidRobot(device); break; } return `Selected device: ${device}`; }
  • Zod schema defining the input parameters: 'device' (string) and 'deviceType' (enum: simulator, ios, android).
    device: z.string().describe("The name of the device to select"), deviceType: z.enum(["simulator", "ios", "android"]).describe("The type of device to select"), },

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/EmpathySlainLovers/MCP'

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