Skip to content

Consolidate Monitor Tools#1678

Merged
g2vinay merged 5 commits intomicrosoft:mainfrom
g2vinay:monitor-consolidate-tools-v2
Feb 12, 2026
Merged

Consolidate Monitor Tools#1678
g2vinay merged 5 commits intomicrosoft:mainfrom
g2vinay:monitor-consolidate-tools-v2

Conversation

@g2vinay
Copy link
Copy Markdown
Contributor

@g2vinay g2vinay commented Feb 9, 2026

No description provided.

@github-project-automation github-project-automation Bot moved this to Untriaged in Azure MCP Server Feb 9, 2026
@g2vinay g2vinay changed the title Consolidate Monitor webtest get create commands Consolidate Monitor Tools Feb 9, 2026
@g2vinay g2vinay force-pushed the monitor-consolidate-tools-v2 branch from b5955b6 to d6e28c2 Compare February 11, 2026 09:31
@g2vinay g2vinay marked this pull request as ready for review February 11, 2026 17:37
Copilot AI review requested due to automatic review settings February 11, 2026 17:37
@g2vinay g2vinay requested review from a team, jongio and srnagar as code owners February 11, 2026 17:37
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 consolidates Azure Monitor Web Tests tooling by merging list → get and create/update → createorupdate, and updates tests/docs to match the new command surface.

Changes:

  • Merged web tests list functionality into monitor_webtests_get (optional --webtest-resource).
  • Merged create + update into monitor_webtests_createorupdate with “create if missing” behavior.
  • Updated live tests, docs, prompt datasets, and consolidation mappings to use the new tool names.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/WebTests/WebTestsUpdateCommandTests.cs Removed tests for deleted update command.
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/WebTests/WebTestsListCommandTests.cs Removed tests for deleted list command.
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/WebTests/WebTestsGetCommandTests.cs Updated get tests and added list-via-get scenarios.
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/WebTests/WebTestsCreateOrUpdateCommandTests.cs Added unit tests for consolidated create/update command.
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/WebTests/WebTestsCreateCommandTests.cs Removed tests for deleted create command.
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.LiveTests/assets.json Updated recorded test assets tag.
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.LiveTests/MonitorCommandTests.cs Updated live tests to call consolidated tool names.
tools/Azure.Mcp.Tools.Monitor/src/Options/WebTests/WebTestsListOptions.cs Removed list options type (list merged into get).
tools/Azure.Mcp.Tools.Monitor/src/Options/WebTests/WebTestsGetOptions.cs Renamed option property to reflect get/list behavior.
tools/Azure.Mcp.Tools.Monitor/src/Options/WebTests/WebTestsCreateOrUpdateOptions.cs Renamed update options type to consolidated create/update options.
tools/Azure.Mcp.Tools.Monitor/src/Options/WebTests/WebTestsCreateOptions.cs Removed create options type (create merged into createorupdate).
tools/Azure.Mcp.Tools.Monitor/src/MonitorSetup.cs Updated DI + command registration to the two consolidated commands.
tools/Azure.Mcp.Tools.Monitor/src/Commands/WebTests/WebTestsListCommand.cs Deleted list command (list merged into get).
tools/Azure.Mcp.Tools.Monitor/src/Commands/WebTests/WebTestsGetCommand.cs Added list behavior when --webtest-resource omitted.
tools/Azure.Mcp.Tools.Monitor/src/Commands/WebTests/WebTestsCreateOrUpdateCommand.cs Implemented consolidated create/update behavior.
tools/Azure.Mcp.Tools.Monitor/src/Commands/WebTests/WebTestsCreateCommand.cs Deleted create command (create merged into createorupdate).
tools/Azure.Mcp.Tools.Monitor/src/Commands/MonitorJsonContext.cs Updated STJ source-gen registrations for new result types.
servers/Azure.Mcp.Server/docs/e2eTestPrompts.md Updated tool prompt mappings to consolidated tools.
servers/Azure.Mcp.Server/docs/azmcp-commands.md Updated CLI docs to reflect consolidated commands and examples.
servers/Azure.Mcp.Server/changelog-entries/1770802245050.yaml Added breaking change entry describing consolidation.
eng/tools/ToolDescriptionEvaluator/prompts/prompts.json Updated evaluator prompts to new tool names/behaviors.
core/Microsoft.Mcp.Core/src/Areas/Server/Resources/consolidated-tools.json Updated consolidated-tool mapping to new web tests tool set.
Comments suppressed due to low confidence (4)

tools/Azure.Mcp.Tools.Monitor/src/Commands/WebTests/WebTestsCreateOrUpdateCommand.cs:31

  • Typo in user-facing description: "Multstep" should be "Multistep".
    tools/Azure.Mcp.Tools.Monitor/src/Commands/WebTests/WebTestsCreateOrUpdateCommand.cs:153
  • The existence check treats any exception from GetWebTest as "web test doesn't exist" and proceeds to create. This can mask real failures (auth, throttling, transient network issues) and cause incorrect create attempts. Please only treat a true not-found condition as non-existence (e.g., detect an inner RequestFailedException with 404), and rethrow/handle other exceptions.
    tools/Azure.Mcp.Tools.Monitor/src/Commands/WebTests/WebTestsCreateOrUpdateCommand.cs:175
  • The ArgumentException messages reference option names that don't match the registered flags (e.g., --appinsights-component, --webtest-locations). Please update these messages to use the actual option names, and consider string.IsNullOrWhiteSpace so whitespace-only values are rejected consistently.
    tools/Azure.Mcp.Tools.Monitor/src/Commands/WebTests/WebTestsCreateOrUpdateCommand.cs:205
  • In the create path, options are bound with GetValueWithoutDefault, so values with DefaultValueFactory in MonitorOptionDefinitions (e.g., enabled=true, expected-status-code=200, frequency=300, http-verb=GET, ssl-check=true, timeout=120, etc.) will be passed as null when not explicitly provided. This changes behavior vs the previous create command. Please apply the option defaults when creating (while still preserving "explicit-only" semantics for update).

Comment thread tools/Azure.Mcp.Tools.Monitor/src/Commands/WebTests/WebTestsGetCommand.cs Outdated
- Enhanced monitor_webtests_createorupdate description with action-oriented language and clear use cases
- Fixed documentation consistency in monitor_webtests_get (use --webtest-resource instead of webtest-name)
- Tool evaluation results: createorupdate now ranks microsoft#1 for update scenarios (50% improvement)
- monitor_webtests_get maintains 100% Rank microsoft#1 performance (score: 0.767)
@g2vinay g2vinay force-pushed the monitor-consolidate-tools-v2 branch from 03f9644 to 51d7a3d Compare February 11, 2026 20:26
@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure MCP Server Feb 12, 2026
@g2vinay g2vinay merged commit 9b25d56 into microsoft:main Feb 12, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Feb 12, 2026
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Apr 20, 2026
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.

4 participants