add analytics support to the Dart MCP server (#174)
Based on https://github.com/dart-lang/tools/pull/2112
Adds analytics events for all tool calls as well as for the runtime errors resource.
We could consider a generic resource read event which includes the URI, but we could accidentally create URIs that have some information we don't want to capture, so I chose to instead just customize this and not provide the URI, but a field that describes the type of resource that was read.
I did not add any debouncing because I don't think it is necessary, LLMs do not invoke tools in super rapid succession generally, but let me know if you all disagree and think I should do some debouncing.
9 files changed