Enable roots tools always, collapse under one tool (#440)

Fixes https://github.com/dart-lang/ai/issues/439 - and hopefully all future roots issues.

This enables adding/removing roots at will and will merge those with any roots set by the client.

## Security implications

The Dart MCP server in general doesn't perform destructive operations (outside of dart format), so security implications here are light. It does mean that an agent attached to one workspace, can actually interact with other dart projects through the MCP server, but I think that is generally a plus.

Everything is still guarded behind a tool call, so users can choose to not auto-approve based on their agent settings, and any adding/removing of roots will be explicit in that mode.
9 files changed
tree: b3932b45cd471fac7943b2905a31b353ffdc0e02
  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