MCP Tools in Drills: Drill Create - #3320
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Tool Description Evaluator ResultsTest 1Expected Tool: Results
Test 2Expected Tool: Results
Test 3Expected Tool: Results
|
There was a problem hiding this comment.
Pull request overview
Adds a new Azure Resilience Management MCP tool for creating/updating drills, wiring it into the toolset, server documentation, consolidated tool mappings, and test coverage.
Changes:
- Added
resilience_drill_createcommand (options, models, command implementation) plus service-layer support. - Added unit + live/integration test coverage for drill creation.
- Updated Azure MCP Server docs/metadata (README prompts,
azmcp-commands.md, e2e prompts, consolidated-tools mapping) and added a changelog entry.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/ResilienceManagementCommandTests.cs | Adds live/integration test coverage for drill creation tool invocation. |
| tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/Drills/DrillCreateCommandTests.cs | Adds unit tests for input validation, success path, and error sanitization. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Services/ResilienceManagementService.cs | Adds CreateDrillAsync implementation using ARM SDK types. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Services/IResilienceManagementService.cs | Extends service interface with CreateDrillAsync. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/ResilienceManagementSetup.cs | Registers the new command and exposes it under the resilience drill subgroup. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Options/Drills/DrillCreateOption.cs | Introduces options model for drill create. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/DrillRbacSetupMode.cs | Adds RBAC setup mode enum for drill creation inputs. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Models/DrillKind.cs | Adds drill kind enum (zonal/regional). |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/ResilienceManagementJsonContext.cs | Registers the new command result type for source-gen JSON serialization. |
| tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Drills/DrillCreateCommand.cs | Implements the create command (validation, execution, error mapping). |
| servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json | Maps resilience_drill_create into the consolidated resilience “create resources” tool list. |
| servers/Azure.Mcp.Server/README.md | Documents example prompts and updates service capability list to include drills. |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Adds e2e prompts for the new drill create tool. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Documents the new azmcp resilience drill create command and updates drill get/resource signatures. |
| servers/Azure.Mcp.Server/changelog-entries/resilience-drill-create.yml | Adds a changelog entry for the new command. |
Suppressed comments (1)
tools/Azure.Mcp.Tools.ResilienceManagement/src/Commands/Drills/DrillCreateCommand.cs:95
- IsValidResourceGroupCharacter currently disallows parentheses, which can cause DrillCreate to reject resource groups that other commands accept (and that Azure allows).
private static bool IsValidResourceGroupCharacter(char character) =>
character is >= 'a' and <= 'z' or >= 'A' and <= 'Z' or >= '0' and <= '9' or '_' or '-' or '.';
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Vinay Gera (g2vinay)
left a comment
There was a problem hiding this comment.
Good start, my review comments are in-line.
| ArmOperation<ResilienceManagementDrillResource> operation = await drills.CreateOrUpdateAsync(WaitUntil.Started, drill, drillData, cancellationToken); | ||
| await WaitForLroCompletionAsync(operation, cancellationToken); | ||
|
|
||
| using JsonDocument document = JsonDocument.Parse(operation.GetRawResponse().Content.ToMemory()); |
There was a problem hiding this comment.
After WaitUntil.Started + WaitForLroCompletionAsync, operation.GetRawResponse() is the async-operation status envelope, not the drill resource, so it has no id or properties. That is why Should_create_drill fails on the test legs: the asserted id, provisioningState, and drillType are not in that payload. The sibling creates (CreateUsagePlanAsync, CreateUsagePlanEnrollmentAsync) and the new GetDrillAsync all read ...Value.Data. Please return MapDrill(operation.Value.Data) here (that overload already exists) and drop the raw-response parse, then re-record the live test.
…drillcreate # Conflicts: # servers/Azure.Mcp.Server/docs/e2eTestPrompts.md # tools/Azure.Mcp.Tools.ResilienceManagement/src/ResilienceManagementSetup.cs # tools/Azure.Mcp.Tools.ResilienceManagement/src/Services/IResilienceManagementService.cs # tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/ResilienceManagementCommandTests.cs # tools/Azure.Mcp.Tools.ResilienceManagement/tests/Azure.Mcp.Tools.ResilienceManagement.Tests/assets.json
5f5f303 to
2a3933b
Compare
What does this PR do?
[Provide a clear, concise description of the changes][Add additional context, screenshots, or information that helps reviewers]GitHub issue number?
[Link to the GitHub issue this PR addresses]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