Description
See the Model Context Protocol and specifically what it looks like to register a "tool" as a server.
These are very similar to DTD service extensions and VM service extensions, and we very likely want to expose those from our own MCP server as "tools". The main difference is that the MCP "tools" require a schema and a description. These are used by the AI to try and figure out when a user is trying to invoke a given tool, as well as how to invoke it properly.
Wait, what is this?
A quick tldr; here is that MCP is an open protocol for AI models to interact with other tools. We want to write an MCP server for Dart programmers, which can connect the AI models to their apps - exposing all the same functionality that devtools etc get today.
Use cases
Some example use cases are taking a screenshot to provide as context to the model, providing runtime and static errors as context, providing info about the selected widget as context, or even calling arbitrary service extensions registered from inside or outside the app.
For known extensions, we can provide our own description and schemas, so we can start there. But eventually it would be useful for the extensions to actually provide descriptions and schemas, so that we can support invoking arbitrary extensions in the future.