Tools API for your Copilot Extensions #2411
Replies: 8 comments 19 replies
-
We have launched agent mode in preview https://code.visualstudio.com/docs/copilot/copilot-edits#_use-agent-mode-preview |
Beta Was this translation helpful? Give feedback.
-
@isidorn Hey, coming here from the https://code.visualstudio.com/blogs/2025/02/24/introducing-copilot-agent-mode post:
We have recently added support for Copilot chat in Wallaby, also working on adding support in Console Ninja. We have implemented a few In terms of tool contribution, some form of tool registration for the Edits/Agent from within a running extension would be great, because it would be much easier to get access to the full context of the extension's state from the tool. The current way to expose tools to chat via a chat participant MCP server support would also work for us in some way, but I guess extensions may need more plumbing to be able to connect the MCP server to the running extension itself. With MCP, it would be great to at least have MCP roots support, so that the tool can know about the context it is running in, should it somehow need to connect/talk to a running extension to get some state or invoke some code of the extension. |
Beta Was this translation helpful? Give feedback.
-
Just saw this video from the LangChain folks. MCP connections are possible in Cursor, Windsurf, and Claude Desktop. I like Copilot Edits and plan to use it with my students. Adding the option to connect MCP to VS Code Copilot would be very very nice. Thanks for your consideration. |
Beta Was this translation helpful? Give feedback.
-
Hello! I work on the Chromium code base which is massive, and I Would like to write an agent that uses |
Beta Was this translation helpful? Give feedback.
-
Hello! Thank you so much for this! How do I allow the agent to use the terminal and run stuff (or force it to run only one command if possible) without asking for my permission each time? |
Beta Was this translation helpful? Give feedback.
-
Apart from tools, do we get other primitives like resources and prompts for agent mode mcp? |
Beta Was this translation helpful? Give feedback.
-
I've integrated a few languageModelTools into our extension, and the models can now successfully invoke them. However, the |
Beta Was this translation helpful? Give feedback.
-
A VSCode extension exposes an underlying (deterministic) tool, such as a compiler, within the VSCode. One approach to integrating this functionality into an agentic workflow is through |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We have finalized the Tools API 🚀
Docs can be found here https://code.visualstudio.com/api/extension-guides/tools
Try out the API and let us know what you think about it.
Check out this sample:
https://github.com/microsoft/vscode-extension-samples/blob/main/chat-sample/README.md
Add the following to package.json:
"enabledApiProposals": ["languageModelToolsForAgent”],
In langaugeModelTools in package.json, ensure you add the vscode_editing tag:
You then should be able to go to agent mode and your tool can be invoked from a user prompt:
This should be enough to get you started and show what’s possible.
We are still trying to understand what gaps we might have in this approach and what adjustments/affordances we may need to have to make the experience work. As you start building out a POC with some developer scenarios, please report back if there’s anything you feel is required to land your testing scenarios.
Thank you 🙏
Beta Was this translation helpful? Give feedback.
All reactions