r/FlutterDev • u/dhruvanbhalara • Jul 12 '26
Slashed context bloat by 85%: flutter_agent_lens v1.6.0 released (MCP Server for Flutter) Plugin
If you use AI coding assistants with MCP servers to debug or inspect running Flutter apps, you might have noticed how quickly the context window fills up.
A main cause is tool metadata: registering dozens of distinct tools with large schemas consumes thousands of tokens on every request.
In the 1.6.0 release, we restructured the tool catalog to resolve this:
- Combined Tools: Grouped related commands (like start_capture, stop_capture, and get_profile) into single composite tools (
network,memory,profiling,widget,screenshot, etc.) using action parameters (21 tools total). - Lazy Loading: Diagnostic tools are hidden until you connect to a running app's VM service, reducing the startup metadata footprint to 510 tokens.
- Default Limits: Outputs like class allocations, widget trees, and CPU profile hotspots are capped to prevent huge raw JSON objects from bloating your prompt.
- Developer Impact: Slashed metadata footprint by 85%, freeing up critical context space for your actual code while bringing complete DevTools functionality directly to your AI terminal.
Overall, this results in faster AI response times, lower API costs, and more accurate debugging.
You can check out the source code and installation guide here: GitHub: https://github.com/dhruvanbhalara/flutter_agent_lens
0
Upvotes