Skip to content

Migrate LM tools over to MCP#1528

Merged
MicroFish91 merged 16 commits into
mainfrom
mwf/mcp-all-the-things
Jun 30, 2026
Merged

Migrate LM tools over to MCP#1528
MicroFish91 merged 16 commits into
mainfrom
mwf/mcp-all-the-things

Conversation

@MicroFish91

@MicroFish91 MicroFish91 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings June 29, 2026 17:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AzExtLMTool implementation to an MCP CopilotTool, 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.

Comment thread src/utils/lazy.ts Outdated
Comment thread src/utils/lazy.ts Outdated
Comment thread src/extensionVariables.ts Outdated
Comment thread src/constants.ts Outdated
@MicroFish91 MicroFish91 marked this pull request as ready for review June 29, 2026 21:17
@MicroFish91 MicroFish91 requested a review from a team as a code owner June 29, 2026 21:17
Comment thread src/chat/tools/registerTools.ts Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
nturinski
nturinski previously approved these changes Jun 30, 2026
@MicroFish91 MicroFish91 merged commit 483ead0 into main Jun 30, 2026
3 checks passed
@MicroFish91 MicroFish91 deleted the mwf/mcp-all-the-things branch June 30, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants