-
Notifications
You must be signed in to change notification settings - Fork 363
Description
Introduction
This is a tracking issue for adding AI assistance in DevTools.
The proposed architecture is to leverage the Dart Tooling Daemon (DTD) to communicate with the Dart MCP Server. This change will allow for bidirectional communication, specifically enabling DevTools to send "sampling requests" to the AI agent that launched the MCP server.
This allows DevTools to interoperate with the user's preferred AI agent and model.
Context
Currently, the Dart IDE Plugin bootstraps the tooling environment (launching DTD and DevTools), while the AI Agent initializes the Dart MCP Server. The MCP Server connects to DTD to expose hooks (MCP "tools") that the AI agent can invoke (e.g., get_widget_tree).
However, this communication is correctly unidirectional:
- Current: AI Agent -> MCP Server -> DTD -> DevTools.
- Missing: DevTools -> DTD -> MCP Server -> AI Agent.
To support AI-assisted features directly within DevTools, we need the communication to be bidirectional, so that DevTools can send queries to the AI agent. By utilizing the "sampling" feature of the Model Context Protocol, DevTools can send user queries and context (e.g., network failure details) to the user's AI agent.
Scope
The scope of this feature is large. It is expected to be a multi-month project, involving work and coordination outside of the DevTools repo.