FlutterDevToolsMCPServer constructor

FlutterDevToolsMCPServer({
  1. required StreamChannel<String> channel,
})

Implementation

FlutterDevToolsMCPServer({required StreamChannel<String> channel})
    : super.fromStreamChannel(
        channel,
        implementation: Implementation(
          name: 'flutter_devtools_mcp',
          version: '0.1.0',
        ),
        instructions:
            'This server connects to a running Flutter app via the Dart VM service and exposes performance, memory, and debugging tools. '
            'ALWAYS call connect_to_app first before any other tool — it requires the ws:// URI printed by flutter run. '
            'ALWAYS call take_screenshot before performance tools so you can see the current screen and tell the user exactly what to interact with. '
            'When the user says their app is slow, laggy, stutters, or drops frames — call my_app_feels_slow. '
            'When the user says memory is high, the app crashes with OOM, or RAM keeps growing — call app_uses_too_much_memory. '
            'When unsure where to start or user has no specific complaint — call run_health_check. It combines screenshot, FPS, and memory in one call. '
            'Performance tools (capture_frame_timing, get_cpu_hotspots, get_widget_rebuild_counts, analyze_jank_causes) require the user to interact with the app during the capture window. '
            'Always tell the user what to do BEFORE calling these tools: "Please scroll the list / tap the button / open the chart now." '
            'Call help to see all tools grouped by problem category.',
      );