Skip to main content
Glama
zillow
by zillow

listDeviceImages

Retrieve available device images for Android or iOS platforms to support mobile automation testing and development.

Instructions

List all available device images for the specified platform

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformYesTarget platform

Implementation Reference

  • Main execution handler for the 'listDeviceImages' MCP tool. Instantiates DeviceUtils and calls listDeviceImages(platform), then formats response.
    const listDeviceImagesHandler = async (args: listDeviceImagesArgs) => {
      try {
    
        const deviceUtils = new DeviceUtils();
        const imageList = await deviceUtils.listDeviceImages(args.platform);
    
        return createJSONToolResponse({
          message: `Found ${imageList.length} available ${args.platform} AVDs`,
          images: imageList,
          count: imageList.length,
          platform: args.platform
        });
      } catch (error) {
        throw new ActionableError(`Failed to list ${args.platform} AVDs: ${error}`);
      }
    };
  • Zod input schema validation for listDeviceImages tool: requires 'platform' as 'android' or 'ios'.
    export const listDeviceImagesSchema = z.object({
      platform: z.enum(["android", "ios"]).describe("Target platform")
    });
  • ToolRegistry registration of 'listDeviceImages' with name, description, schema, and handler.
    ToolRegistry.register(
      "listDeviceImages",
      "List all available device images for the specified platform",
      listDeviceImagesSchema,
      listDeviceImagesHandler
    );
  • Core helper method DeviceUtils.listDeviceImages that routes to AndroidEmulator.listAvds() or Simctl.listSimulatorImages() based on platform.
    async listDeviceImages(platform: SomePlatform): Promise<DeviceInfo[]> {
      switch (platform) {
        case "android":
          return this.emulator.listAvds();
        case "ios":
          return this.simctl.listSimulatorImages();
        case "either":
          const emulators = await this.emulator.listAvds();
          const simulators = await this.simctl.listSimulatorImages();
          return [...emulators, ...simulators];
      }
    }
  • Android-specific helper: executes 'avdmanager list avd', parses output to list available AVD images (used by AndroidEmulator.listAvds()).
    export async function listDeviceImages(dependencies = createDefaultDependencies()): Promise<AvdInfo[]> {
      try {
        const location = await ensureToolsAvailable(dependencies);
        const avdmanagerPath = getAvdManagerPath(location, dependencies);
    
        const result = await spawnCommand(avdmanagerPath, ["list", "avd"], {}, dependencies);
    
        if (result.exitCode !== 0) {
          throw new Error(`Failed to list AVDs: ${result.stderr}`);
        }
    
        return parseAvdList(result.stdout);
      } catch (error) {
        dependencies.logger.error(`Failed to list AVDs: ${(error as Error).message}`);
        throw error;
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it 'List[s] all available device images', which suggests a read-only operation, but doesn't disclose behavioral traits like whether it requires authentication, has rate limits, returns paginated results, what format the images are in, or if there are any side effects. For a tool with zero annotation coverage, this is a significant gap in behavioral context.

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 front-loads the core action ('List all available device images') and specifies the key constraint ('for the specified platform'). There is zero waste, and every word earns its place by clarifying the tool's purpose without redundancy.

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

Completeness3/5

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

Given the tool's low complexity (1 parameter, no nested objects) and high schema coverage (100%), the description is minimally adequate. However, with no annotations and no output schema, it lacks context about behavioral traits (e.g., read-only vs. destructive, authentication needs) and return values (e.g., what 'device images' includes). This leaves gaps for an AI agent to fully understand the tool's operation.

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 100%, with the single parameter 'platform' fully documented in the schema (type: string, enum: [android, ios], description: 'Target platform'). The description adds no additional parameter semantics beyond what the schema provides, such as explaining what 'available device images' means or how the platform selection affects the output. Baseline 3 is appropriate when the schema does the heavy lifting.

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 verb 'List' and the resource 'device images', specifying 'for the specified platform'. It distinguishes from obvious siblings like listDevices (which lists devices, not images) and listApps (which lists apps, not images). However, it doesn't explicitly differentiate from less obvious siblings like getAllConfigs or installPlatformDependencies, which might also involve platform-specific resources.

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

Usage Guidelines3/5

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

The description implies usage when needing available device images for a platform, but provides no explicit guidance on when to use this tool versus alternatives like listDevices or checkPlatformDependencies. It doesn't mention prerequisites, exclusions, or specific scenarios where this tool is preferred over others in the sibling set.

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