Skip to content

Migrate App Lens Diagnose Tool from @azure to az mcp server#356

Merged
msalaman merged 28 commits intomainfrom
masalama/AddAppLensTool
Sep 12, 2025
Merged

Migrate App Lens Diagnose Tool from @azure to az mcp server#356
msalaman merged 28 commits intomainfrom
masalama/AddAppLensTool

Conversation

@msalaman
Copy link
Copy Markdown
Contributor

@msalaman msalaman commented Sep 5, 2025

What does this PR do?

Added App Lens Diagnose Resource tool that diagnoses Azure resource performance issues, slowness, failures, and availability problems using the AppLens API

Example of tool in use:
image

GitHub issue number?

[Link to the GitHub issue this PR addresses]

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Updated command list in /docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

@msalaman msalaman marked this pull request as ready for review September 5, 2025 22:38
Copilot AI review requested due to automatic review settings September 5, 2025 22:38
@msalaman msalaman requested review from a team as code owners September 5, 2025 22:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 App Lens Diagnose Tool from @Azure to az mcp server, adding comprehensive Azure resource diagnostics capabilities using the AppLens API. The tool enables AI-powered conversational diagnostics to identify issues, root causes, and provide actionable solutions for Azure resource performance, availability, and reliability problems.

  • Adds AppLens service integration with SignalR-based conversational diagnostics
  • Implements resource diagnosis command with comprehensive validation and error handling
  • Provides extensive unit test coverage for service logic and command execution

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/Azure.Mcp.Tools.AppLens/src/Services/AppLensService.cs Core service implementing AppLens diagnostic operations with SignalR communication
tools/Azure.Mcp.Tools.AppLens/src/Commands/Resource/ResourceDiagnoseCommand.cs Command implementation for resource diagnosis with parameter validation
tools/Azure.Mcp.Tools.AppLens/src/Models/AppLensModels.cs Data models for AppLens sessions, responses, and diagnostic results
tools/Azure.Mcp.Tools.AppLens/tests/Azure.Mcp.Tools.AppLens.UnitTests/Services/AppLensServiceTests.cs Unit tests for AppLens service validation logic
tools/Azure.Mcp.Tools.AppLens/tests/Azure.Mcp.Tools.AppLens.UnitTests/Resource/ResourceDiagnoseCommandTests.cs Unit tests for resource diagnose command scenarios
servers/Azure.Mcp.Server/src/Program.cs Integration of AppLens setup into main server
docs/azmcp-commands.md Documentation for new AppLens commands

Comment thread tools/Azure.Mcp.Tools.AppLens/src/Options/Resource/ResourceDiagnoseOptions.cs Outdated
Comment thread docs/azmcp-commands.md Outdated
Comment thread .vscode/launch.json Outdated
feiskyer pushed a commit to feiskyer/microsoft-mcp that referenced this pull request Sep 8, 2025
Comment thread .github/CODEOWNERS Outdated
Comment thread docs/azmcp-commands.md Outdated
Comment thread docs/e2eTestPrompts.md Outdated
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Commands/Resource/ResourceDiagnoseCommand.cs Outdated
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Commands/Resource/ResourceDiagnoseCommand.cs Outdated
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Options/AppLensOptionDefinitions.cs Outdated
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Options/AppLensOptionDefinitions.cs Outdated
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Options/Resource/ResourceDiagnoseOptions.cs Outdated
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Options/Resource/ResourceDiagnoseOptions.cs Outdated
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Services/AppLensService.cs Outdated
@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure MCP Server Sep 8, 2025
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Services/IAppLensService.cs
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Services/AppLensService.cs Outdated
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Services/AppLensService.cs Outdated
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Services/AppLensService.cs Outdated
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Commands/Resource/ResourceDiagnoseCommand.cs Outdated
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Commands/Resource/ResourceDiagnoseCommand.cs Outdated
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Commands/Resource/ResourceDiagnoseCommand.cs Outdated
Comment thread tools/Azure.Mcp.Tools.AppLens/src/Services/AppLensService.cs
@msalaman msalaman requested a review from jongio September 11, 2025 18:56
@msalaman msalaman merged commit 23b0d6d into main Sep 12, 2025
25 checks passed
@msalaman msalaman deleted the masalama/AddAppLensTool branch September 12, 2025 00:19
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Sep 12, 2025
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Sep 27, 2025
…t#356)

* added applens tool

* fix connection to applens session

* updated prompt and parameters for more seamless user experience

* updated documentation

* update description

* added tests

* update change log

* update json launch

* Updated tool to work with latest changes to Options

* fix spelling

* fix tests

* update tests

* fix formatting

* fix options to address comments

* fix formatting

* updated e2e prompts

* updated OptionBinding

* remove unnecessary try/catch

* use httpclientservice

* use subscription service

* shorten tool description to fit max requirements

* remove unnecessary response status/message

* undo local change

* fix tests

* addressed comments

* fix formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants