devtools icon indicating copy to clipboard operation
devtools copied to clipboard

[Tracking Issue] AI assistance in Dart & Flutter DevTools

Open elliette opened this issue 4 weeks ago • 1 comments

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.

elliette avatar Dec 09 '25 22:12 elliette

AI assistance in DevTools requires the various AI agents to support the "sampling" feature of the Model Context Protocol.

The following table will be updated as sampling support is added for each AI agent.

AI Agent Supports sampling? Tracking issue
Github CoPilot ✔️ N/A
Claude Code https://github.com/anthropics/claude-code/issues/1785
Cursor https://github.com/cursor/cursor/issues/3023
Gemini CLI https://github.com/google-gemini/gemini-cli/issues/2397, https://github.com/google-gemini/gemini-cli/issues/10704, https://github.com/google-gemini/gemini-cli/issues/12234
Gemini Code Assist N/A
Google Antigravity N/A

elliette avatar Dec 09 '25 22:12 elliette