Migrate LM tools over to MCP#1528
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the extension’s Copilot/agent tooling from VS Code “LM tools” contribution points to an in-proc MCP server, and rewires the existing Azure Activity Log tool to be exposed via MCP (with associated telemetry updates).
Changes:
- Replaced LM-tool registration/contribution (
languageModelTools) with an MCP server definition + in-proc MCP tool registration. - Ported “Get Azure Activity Log” from an
AzExtLMToolimplementation to an MCPCopilotTool, including updated selection/telemetry handling. - Introduced shared constants (extension id + MCP server id/label) and a small
Lazy<T>helper for version retrieval.
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/lazy.ts | Adds a Lazy<T> helper used to lazily compute extension version. |
| src/extensionVariables.ts | Adds a lazily-computed ext.version and related imports. |
| src/extension.ts | Registers the MCP HTTP provider and tool registration; uses centralized extension id constant. |
| src/constants.ts | Adds centralized extension id and MCP server id/label constants. |
| src/chat/tools/registerLMTools.ts | Removes LM tool registration entry point. |
| src/chat/tools/registerAzExtTools.ts | Adds MCP tool registration entry point. |
| src/chat/tools/GetAzureActivityLog/GetAzureActivityLog.ts | Removes the LM-tool implementation of “Get Azure Activity Log”. |
| src/chat/tools/azureActivityLog/getAzureActivityLog/logTelemetry.ts | Adds telemetry helpers for activity log tool execution. |
| src/chat/tools/azureActivityLog/getAzureActivityLog/GetAzureActivityLogContext.ts | Fixes relative import path for ActivitySelectedCache after file moves. |
| src/chat/tools/azureActivityLog/getAzureActivityLog/getAzureActivityLog.ts | Adds MCP tool implementation for “Get Azure Activity Log”. |
| src/chat/tools/azureActivityLog/getAzureActivityLog/convertActivityTree.ts | Updates imports to match new folder structure. |
| src/chat/askAgentAboutActivityLog/askAgentAboutActivityLog.ts | Avoids opening agent chat when no activity items are selected. |
| package.nls.json | Adds localized label string for MCP server definition provider. |
| package.json | Removes languageModelTools, adds mcpServerDefinitionProviders, and adds new dependencies. |
| package-lock.json | Updates lockfile for new MCP/zod (and transitive) dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
nturinski
reviewed
Jun 30, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
nturinski
previously approved these changes
Jun 30, 2026
nturinski
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converting to MCP so our tools can be accessed via Copilot CLI.
Built leveraging Brandon's MCP work / package.
The activity log tool's core logic hasn't changed much, just re-wrapped to be contributed as an MCP tool.