Skip to main content
Glama

list_devices

Read-only

Discover available Android emulators and iOS simulators for Tauri mobile app testing and development.

Instructions

[Tauri Mobile Apps Only] List Android emulators/devices and iOS simulators. Use for Tauri mobile development (tauri android dev, tauri ios dev). Not needed for desktop-only Tauri apps or web projects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler for the 'list_devices' MCP tool. Calls the listDevices() function and formats the result into a human-readable string listing Android devices and iOS booted simulators.
    handler: async () => {
       const devices = await listDevices();
    
       return `Android Devices:\n${devices.android.join('\n') || 'None'}\n\niOS Booted Simulators:\n${devices.ios.join('\n') || 'None'}`;
    },
  • The actual listDevices() async function that concurrently fetches Android devices (via adb) and iOS simulators (via xcrun simctl). Returns { android: string[], ios: string[] }.
    export async function listDevices(): Promise<{ android: string[]; ios: string[] }> {
       const [ android, ios ] = await Promise.all([
          getAndroidDevices(),
          getIOSSimulators(),
       ]);
    
       return { android, ios };
    }
  • Zod schema for list_devices — an empty object (no input parameters required).
    export const ListDevicesSchema = z.object({});
  • Tool definition registration in the TOOLS array. Defines name 'list_devices', description, category (Mobile Development), schema, annotations, and handler.
    // Mobile Development Tools
    {
       name: 'list_devices',
       description:
          '[Tauri Mobile Apps Only] List Android emulators/devices and iOS simulators. ' +
          'Use for Tauri mobile development (tauri android dev, tauri ios dev). ' +
          'Not needed for desktop-only Tauri apps or web projects.',
       category: TOOL_CATEGORIES.MOBILE_DEVELOPMENT,
       schema: ListDevicesSchema,
       annotations: {
          title: 'List Mobile Devices',
          readOnlyHint: true,
          openWorldHint: false,
       },
       handler: async () => {
          const devices = await listDevices();
    
          return `Android Devices:\n${devices.android.join('\n') || 'None'}\n\niOS Booted Simulators:\n${devices.ios.join('\n') || 'None'}`;
       },
    },
  • Helper function getAndroidDevices() that runs 'adb devices -l' and parses the output. Returns empty array if adb is not available.
    async function getAndroidDevices(): Promise<string[]> {
       try {
          const { stdout } = await execa('adb', [ 'devices', '-l' ]);
    
          return stdout
             .split('\n')
             .slice(1)
             .filter((line) => { return line.trim().length > 0; })
             .map((line) => { return line.trim(); });
       } catch(_) {
          // Android SDK not available or adb command failed
          return [];
       }
    }
  • Helper function getIOSSimulators() that runs 'xcrun simctl list devices booted' on macOS only. Returns empty array on Windows/Linux or if xcrun fails.
    async function getIOSSimulators(): Promise<string[]> {
       if (process.platform !== 'darwin') {
          return [];
       }
    
       try {
          const { stdout } = await execa('xcrun', [ 'simctl', 'list', 'devices', 'booted' ]);
    
          return stdout
             .split('\n')
             .filter((line) => { return line.trim().length > 0 && !line.includes('== Devices =='); });
       } catch(_) {
          // Xcode not installed or xcrun command failed
          return [];
       }
    }
Behavior4/5

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

Annotations indicate readOnlyHint=true; description adds platform-specific context (Tauri Mobile Apps Only), which is useful beyond the annotation.

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?

Single sentence conveys all necessary information without redundancy.

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

Completeness5/5

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

Given no parameters and no output schema, the description fully covers the tool's purpose and scope.

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

Parameters4/5

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

No parameters, so baseline 4 applies; description provides no additional parameter info, but none is needed.

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

Purpose5/5

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

Description explicitly states it lists Android emulators/devices and iOS simulators for Tauri mobile development, distinguishing it from desktop-only or web projects.

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

Usage Guidelines4/5

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

Clearly states when to use (Tauri mobile development) and when not (desktop-only or web projects), though it does not name alternative sibling tools for other purposes.

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/hypothesi/mcp-server-tauri'

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