fix the broken Azure Monitor Health Model tool and update health model integration to a minimal working version#2979
Open
abossard wants to merge 5 commits into
Open
Conversation
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
Contributor
|
Thank you for your contribution @abossard! We will review the pull request and get back to you soon. |
Member
|
/azp run mcp - pullrequest - live |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes the Azure Monitor Health Models integration by removing the broken entity-health dataplane command and replacing it with minimal working control-plane commands backed by the Microsoft.CloudHealth/healthmodels ARM surface (via Azure.ResourceManager.CloudHealth). It updates the Azure MCP Server’s tool inventory and docs accordingly, and adds unit coverage for the new commands.
Changes:
- Replaced
monitor healthmodels entity getwithmonitor healthmodels listandmonitor healthmodels get(new commands + options + models). - Reimplemented
IMonitorHealthModelServiceto list/get health models using the CloudHealth ARM SDK and added JSON source-gen registrations. - Updated docs/tool metadata (README, consolidated tools, azmcp-commands, e2e prompts, ToolDescriptionEvaluator prompts) and added changelog entry + spelling dictionary update.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.Tests/HealthModels/HealthModelListCommandTests.cs | Adds unit tests for the new healthmodels list command response shape and option forwarding. |
| tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.Tests/HealthModels/HealthModelGetCommandTests.cs | Adds unit tests for the new healthmodels get command response contract. |
| tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.Tests/HealthModels/Entity/EntityGetHealthCommandTests.cs | Removes tests for the deprecated/removed entity-health command. |
| tools/Azure.Mcp.Tools.Monitor/src/Services/MonitorHealthModelService.cs | Replaces dataplane token+HTTP logic with CloudHealth ARM SDK list/get implementations and projections. |
| tools/Azure.Mcp.Tools.Monitor/src/Services/IMonitorHealthModelService.cs | Updates service contract to ListHealthModels and GetHealthModel returning typed models. |
| tools/Azure.Mcp.Tools.Monitor/src/Options/HealthModels/HealthModelListOptions.cs | Introduces options for healthmodels list (subscription/resource-group/tenant/retry). |
| tools/Azure.Mcp.Tools.Monitor/src/Options/HealthModels/HealthModelGetOptions.cs | Refactors options for healthmodels get (health-model + required resource-group). |
| tools/Azure.Mcp.Tools.Monitor/src/MonitorSetup.cs | Registers new commands in DI and command tree under monitor healthmodels. |
| tools/Azure.Mcp.Tools.Monitor/src/Models/HealthModels/HealthModelSummary.cs | Adds a lean summary DTO for listing results. |
| tools/Azure.Mcp.Tools.Monitor/src/Models/HealthModels/HealthModelIdentity.cs | Adds DTO for managed identity projection. |
| tools/Azure.Mcp.Tools.Monitor/src/Models/HealthModels/HealthModelDetail.cs | Adds detailed DTO extending summary with healthState/identity/tags. |
| tools/Azure.Mcp.Tools.Monitor/src/Commands/MonitorJsonContext.cs | Registers new health model DTOs/results for source-generated JSON (AOT-friendly). |
| tools/Azure.Mcp.Tools.Monitor/src/Commands/HealthModels/HealthModelListCommand.cs | Adds the monitor healthmodels list command implementation. |
| tools/Azure.Mcp.Tools.Monitor/src/Commands/HealthModels/HealthModelGetCommand.cs | Adds the monitor healthmodels get command implementation. |
| tools/Azure.Mcp.Tools.Monitor/src/Commands/HealthModels/Entity/EntityGetHealthCommand.cs | Removes the deprecated/removed entity-health command implementation. |
| tools/Azure.Mcp.Tools.Monitor/src/Azure.Mcp.Tools.Monitor.csproj | Adds CloudHealth ARM SDK package reference. |
| servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json | Swaps tool identifiers from entity get to list/get for monitor healthmodels. |
| servers/Azure.Mcp.Server/README.md | Updates example prompts to reflect new health model commands. |
| servers/Azure.Mcp.Server/KNOWN-ISSUES.md | Removes known-issue entry for the removed healthmodels entity tool. |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Updates e2e prompts for the new health model tools. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Updates CLI command documentation for health models. |
| servers/Azure.Mcp.Server/changelog-entries/1782800143580.yaml | Adds changelog entry describing the tool replacement. |
| eng/tools/ToolDescriptionEvaluator/prompts/prompts.json | Updates evaluator prompts for the renamed/replaced tools. |
| Directory.Packages.props | Adds Azure.ResourceManager.CloudHealth version and bumps shared Azure SDK package versions. |
| .vscode/cspell.json | Adds cloudhealth to spelling dictionary. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
Author
|
ToolDescriptionEvaluator
|
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.
What does this PR do?
Fixes the broken and outdated health model functionality by removing it and replacing it with the latest health model preview API
This will allow to list and see details of the health models in a subscription.
Azure Monitor Health Models
GitHub issue number?
#2247
Pre-merge Checklist
servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationREADME.mdchanges running the script./eng/scripts/Process-PackageReadMe.ps1. See Package READMEToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.jsonbreaking-changelabelservers/Azure.Mcp.Server/docs/azmcp-commands.md./eng/scripts/Update-AzCommandsMetadata.ps1to update tool metadata inazmcp-commands.md(required for CI)servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline