Skip to main content
Glama
zillow
by zillow

startDevice

Start a mobile device with a specified image for automated testing. Use this tool to launch Android or iOS devices by providing device details and target platform.

Instructions

Start a device with the specified device image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
localDeviceYes
platformYesTarget platform

Implementation Reference

  • Main handler function that executes the startDevice tool logic: creates DeviceUtils instance, starts the device process, waits for readiness, reports progress, and returns device info.
    const startDeviceHandler = async (args: startDeviceArgs, progress?: ProgressCallback) => {
      try {
        const deviceUtils = new DeviceUtils();
        const childProcess = await deviceUtils.startDevice(args.device);
    
        if (progress) {
          await progress(60, 100, "Device started, waiting for readiness...");
        }
    
        // Wait for device to be ready
        const readyDevice = await deviceUtils.waitForDeviceReady(args.device, args.timeoutMs);
    
        if (progress) {
          await progress(100, 100, "Device is ready for use");
        }
    
        return createJSONToolResponse({
          message: `${args.device.platform} '${args.device.name}' started and is ready`,
          name: readyDevice.name,
          processId: childProcess.pid,
          isReady: true,
          deviceId: readyDevice.deviceId,
          source: args.device.source,
          platform: args.device.platform
        });
      } catch (error) {
        throw new ActionableError(`Failed to start ${args.device.platform} device: ${error}`);
      }
    };
  • Zod schema defining the input parameters for the startDevice tool, including device details and platform.
    export const startDeviceSchema = z.object({
      localDevice: z.object({
        name: z.string().describe("The device name to start"),
        deviceId: z.string().optional().describe("The device ID")
      }),
      platform: z.enum(["android", "ios"]).describe("Target platform")
    });
  • Registration of the startDevice tool with ToolRegistry, including name, description, schema, handler, and progress support flag.
    ToolRegistry.register(
      "startDevice",
      "Start a device with the specified device image",
      startDeviceSchema,
      startDeviceHandler,
      true // Supports progress notifications
    );
  • TypeScript interface defining the arguments for the startDevice handler.
    export interface startDeviceArgs {
      device: DeviceInfo;
      timeoutMs?: number;
    }
  • Helper method in DeviceUtils class that spawns the actual device process (emulator or simulator) based on platform.
    async startDevice(
      device: DeviceInfo
    ): Promise<ChildProcess> {
      switch (device.platform) {
        case "android":
          return this.emulator.startEmulator(device.name);
        case "ios":
          return this.simctl.startSimulator(device.name);
        default:
          throw new ActionableError("Unknown platform");
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Start') but doesn't describe what happens during startup (e.g., boot time, state changes), potential side effects (e.g., resource consumption, impact on other devices), or error conditions (e.g., if device is already running). This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations, no output schema, and incomplete parameter documentation (50% coverage), the description is insufficient. It doesn't explain what 'starting' entails behaviorally, what the expected outcome is, or how parameters map to the device image concept, leaving significant gaps for the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50% (only 'platform' has a description, 'localDevice' lacks one). The description mentions 'device image' but doesn't clarify how it relates to the parameters (e.g., whether 'deviceId' or 'name' corresponds to the image). It adds minimal value beyond the schema, failing to fully compensate for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Start') and resource ('a device with the specified device image'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'setActiveDevice' or 'killDevice', which would require more specific context about what 'starting' entails versus activating or terminating.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., device must be stopped), related tools (e.g., 'killDevice' for stopping, 'listDevices' for checking status), or specific scenarios (e.g., testing with a particular image). This leaves the agent to infer usage from context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/zillow/auto-mobile'

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