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
tree: 04f2f5b942b7931ae433955396007908c82d0013
  1. .github/
  2. .vscode/
  3. mcp_examples/
  4. pkgs/
  5. .gitignore
  6. CONTRIBUTING.md
  7. LICENSE
  8. README.md
README.md

Overview

A general repository for AI / GenAI packages and explorations.

Packages

PackageDescriptionIssuesVersion
dart_mcpA package for making MCP servers and clients.issuespub package
dart_mcp_serverAn MCP server for Dart projects, exposing various developer tools to AI models.issuesn/a