Add support for custom tool metrics, implement some for analyzer tools (#423)

Now that analysis server starts up lazily, we want to capture how much of any given call went towards that initialization versus actual work in the tool call. This also will capture how much extra time is added in order to apply quick fixes.

Details:
- Adds elapsed time and boolean for whether the server was started to the `withAnalysisServer` callback 
- Adds a new `customMetrics` extension on `CallToolResult` which uses an expando to store additional analytics information for a given tool call.
- Adds support to `CallToolMetrics` to merge this extra information into the analytics data (flat merge).
7 files changed
tree: f5baee6f2abaa8ff6079b869c7eb206220a31f5a
  1. .agents/
  2. .github/
  3. .vscode/
  4. mcp_examples/
  5. pkgs/
  6. .gitignore
  7. CONTRIBUTING.md
  8. GEMINI.md
  9. LICENSE
  10. 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