Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for deleting Azure managed disks via a new azmcp compute disk delete command/tool, wiring it into the Compute tool area and updating related docs and tests.
Changes:
- Introduces
DiskDeleteCommand+DiskDeleteOptionsand registers the command inComputeSetup. - Adds
IComputeService.DeleteDiskAsync/ComputeService.DeleteDiskAsyncimplementation and corresponding unit + live tests. - Updates server docs/metadata (
azmcp-commands.md,e2eTestPrompts.md,consolidated-tools.json) and adds a changelog entry.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.Compute/src/Commands/Disk/DiskDeleteCommand.cs | New delete command implementation + response model and error mapping. |
| tools/Azure.Mcp.Tools.Compute/src/Options/Disk/DiskDeleteOptions.cs | New options type for disk delete. |
| tools/Azure.Mcp.Tools.Compute/src/Services/IComputeService.cs | Adds DeleteDiskAsync contract. |
| tools/Azure.Mcp.Tools.Compute/src/Services/ComputeService.cs | Implements disk deletion via ARM SDK with idempotent 404 handling. |
| tools/Azure.Mcp.Tools.Compute/src/ComputeSetup.cs | Registers and exposes the new disk delete command. |
| tools/Azure.Mcp.Tools.Compute/src/Commands/ComputeJsonContext.cs | Adds STJ source-gen metadata for delete result. |
| tools/Azure.Mcp.Tools.Compute/tests/Azure.Mcp.Tools.Compute.UnitTests/Disk/DiskDeleteCommandTests.cs | New unit tests for delete command. |
| tools/Azure.Mcp.Tools.Compute/tests/Azure.Mcp.Tools.Compute.LiveTests/ComputeCommandTests.cs | Adds live tests for disk delete scenarios; adjusts gallery disk create test location. |
| tools/Azure.Mcp.Tools.Compute/tests/Azure.Mcp.Tools.Compute.LiveTests/assets.json | Updates recorded-test assets tag. |
| servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json | Adds consolidated tool entry mapping to compute_disk_delete. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Documents azmcp compute disk delete usage/params/returns. |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Adds prompts for compute_disk_delete (and reorders sections). |
| servers/Azure.Mcp.Server/changelog-entries/1773681010911.yaml | Adds changelog entry for the new tool. |
| servers/Azure.Mcp.Server/README.md | Adds an example prompt mentioning disk delete. |
| tools/Azure.Mcp.Tools.Compute/src/Commands/Disk/DiskCreateCommand.cs | Removes /// <inheritdoc/> comment markers. |
| tools/Azure.Mcp.Tools.Compute/src/Commands/Disk/DiskGetCommand.cs | Removes /// <inheritdoc/> comment markers. |
| tools/Azure.Mcp.Tools.Compute/src/Commands/Disk/DiskUpdateCommand.cs | Removes /// <inheritdoc/> comment markers. |
You can also share your feedback on Copilot code review. Take the survey.
tools/Azure.Mcp.Tools.Compute/src/Commands/Disk/DiskDeleteCommand.cs
Outdated
Show resolved
Hide resolved
|
@audreyttt can we also add --force-delete parameter that is present in remove-azdisk? https://learn.microsoft.com/en-us/powershell/module/az.compute/remove-azdisk?view=azps-15.4.0 You would have to ensure it's not ambiguous with the --force elicitation option For vm I have --force-deletion for force-delete and --force for elicitation. |
The force parameter in disk delete is different from the force-deletion parameter that vm delete has. For vm delete this is a feature to force delete a VM even when it's running/attached but for disk this parameter is just a client-side confirmation skip, and we already have the --force flag and secret metadata=true doing this. |
|
Top Choice Success: 100.0% (42/42 tests) Confidence Level Distribution💪 Very High Confidence (≥0.8): 0.0% (0/42 tests) Top Choice + Confidence Combinations💪 Top Choice + Very High Confidence (≥0.8): 0.0% (0/42 tests) |
What does this PR do?
Onboarding issue: #1552
Adds command
azmcp compute disk delete'CLI documentation: https://learn.microsoft.com/en-us/cli/azure/disk?view=azure-cli-latest
New Command
azmcp compute disk deleteDeletes an Azure managed disk from the specified resource group.
Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.mdand/orservers/Fabric.Mcp.Server/CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies)servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationeng/scripts/Process-PackageReadMe.ps1. See Package README/servers/Azure.Mcp.Server/docs/azmcp-commands.mdand/or/docs/fabric-commands.md.\eng\scripts\Update-AzCommandsMetadata.ps1to update tool metadata in azmcp-commands.md (required for CI)ToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.jsonbreaking-changelabel/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline