Skip to main content
Glama

flutter_list_devices

Discover connected devices and emulators for Flutter development to identify available testing targets and streamline mobile app debugging.

Instructions

List connected devices and emulators available for Flutter development

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Full tool registration including empty input schema and handler. The handler executes 'flutter devices --machine', parses the JSON output, enhances each device with running session status from global tracking map, and returns structured data with counts.
    tools.set('flutter_list_devices', {
      name: 'flutter_list_devices',
      description: 'List connected devices and emulators available for Flutter development',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      },
      handler: async () => {
        const result = await processExecutor.execute('flutter', ['devices', '--machine']);
        
        if (result.exitCode !== 0) {
          throw new Error(`Failed to list Flutter devices: ${result.stderr}`);
        }
    
        // Parse JSON output
        let devices = [];
        try {
          devices = JSON.parse(result.stdout);
        } catch (parseError) {
          throw new Error(`Failed to parse devices output: ${parseError}`);
        }
    
        // Enhance device info with running session status
        const enhancedDevices = devices.map((device: any) => ({
          ...device,
          hasRunningSession: Array.from(runningFlutterSessions.values()).some(
            session => session.deviceId === device.id
          ),
        }));
    
        return {
          success: true,
          data: {
            devices: enhancedDevices,
            totalCount: enhancedDevices.length,
            connectedCount: enhancedDevices.filter((d: any) => d.isDevice).length,
            simulatorCount: enhancedDevices.filter((d: any) => !d.isDevice).length,
            runningSessionsCount: runningFlutterSessions.size,
          },
        };
      }
    });
  • Metadata registration in the global TOOL_REGISTRY, categorizing the tool as essential, cross-platform, requiring Flutter, safe for testing with performance expectations.
    'flutter_list_devices': {
      name: 'flutter_list_devices',
      category: ToolCategory.ESSENTIAL,
      platform: 'cross-platform',
      requiredTools: [RequiredTool.FLUTTER],
      description: 'List connected devices for Flutter development',
      safeForTesting: true,
      performance: { expectedDuration: 6000, timeout: 15000 }
    },
  • Mapping in validation script for required system tool check (requires 'flutter' CLI).
    'flutter_list_devices': 'flutter',
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool lists devices and emulators but does not specify whether this includes only active ones, the format of the output, potential errors, or any side effects. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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, clear sentence that directly states the tool's purpose without any unnecessary words or fluff. It is appropriately sized and front-loaded, making it efficient and easy to understand.

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 simplicity (0 parameters, no output schema, no annotations), the description is adequate as a basic overview. However, it lacks details on output format, error handling, or differentiation from siblings, which would be helpful for an AI agent. It meets the minimum viable standard but has clear gaps in context.

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?

The tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description does not need to add parameter details, so it meets the baseline expectation for such cases. No additional semantic information is required or provided.

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 ('List') and the target resources ('connected devices and emulators available for Flutter development'), providing a specific verb+resource combination. However, it does not explicitly distinguish this tool from its sibling 'android_list_devices' or 'ios_list_simulators', which reduces the score from a perfect 5.

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 like 'android_list_devices' or 'ios_list_simulators', nor does it mention any prerequisites or context for usage. It merely states what the tool does without indicating appropriate scenarios or exclusions.

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/cristianoaredes/mcp-mobile-server'

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