auto validate tool arguments, improve validation messages (#200)

Marking this as closing https://github.com/dart-lang/ai/issues/197 - it should significantly help the LLM figure out what it did wrong. The error would now be something like "Value `<root>` is not of type `List<dynamic>` at path #root["roots"]".

I made a fair number of changes to the validation errors here, namely only emitting errors for the leaf node where the error actually happened and not the entire path up. I don't think that extra info was helpful.

cc @kenzieschmoll 
15 files changed
tree: f666e7236467fb5483d87d076604d80f8d687024
  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