-
Notifications
You must be signed in to change notification settings - Fork 347
Azure Compute - Disk Operations #1559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 pull request introduces Azure Compute disk operations functionality to the Azure MCP Server, adding the ability to retrieve information about Azure managed disks.
Changes:
- Adds
compute_disk_getcommand for retrieving managed disk information - Implements service layer for Azure Compute operations with list and get capabilities
- Includes comprehensive unit and live tests with test infrastructure
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.Compute/src/Azure.Mcp.Tools.Compute.csproj | Main project file defining dependencies for the Compute tools |
| tools/Azure.Mcp.Tools.Compute/src/GlobalUsings.cs | Global using statements for the Compute tools |
| tools/Azure.Mcp.Tools.Compute/src/ComputeSetup.cs | Service and command registration for the Compute area |
| tools/Azure.Mcp.Tools.Compute/src/Models/Disk.cs | Data model representing an Azure managed disk |
| tools/Azure.Mcp.Tools.Compute/src/Services/IComputeService.cs | Service interface defining Compute operations |
| tools/Azure.Mcp.Tools.Compute/src/Services/ComputeService.cs | Implementation of Compute service with disk operations |
| tools/Azure.Mcp.Tools.Compute/src/Options/BaseComputeOptions.cs | Base options class for Compute commands |
| tools/Azure.Mcp.Tools.Compute/src/Options/ComputeOptionDefinitions.cs | Command-line option definitions for Compute commands |
| tools/Azure.Mcp.Tools.Compute/src/Options/Disk/DiskGetOptions.cs | Options specific to the disk get command |
| tools/Azure.Mcp.Tools.Compute/src/Commands/BaseComputeCommand.cs | Base command class for all Compute commands |
| tools/Azure.Mcp.Tools.Compute/src/Commands/ComputeJsonContext.cs | JSON serialization context for AOT compatibility |
| tools/Azure.Mcp.Tools.Compute/src/Commands/Disk/DiskGetCommand.cs | Implementation of the disk get command |
| tools/Azure.Mcp.Tools.Compute/tests/test-resources.bicep | Bicep template for deploying test resources |
| tools/Azure.Mcp.Tools.Compute/tests/test-resources.json | Compiled ARM template for test resources |
| tools/Azure.Mcp.Tools.Compute/tests/test-resources-post.ps1 | Post-deployment script for test setup |
| tools/Azure.Mcp.Tools.Compute/tests/Azure.Mcp.Tools.Compute.UnitTests/Azure.Mcp.Tools.Compute.UnitTests.csproj | Unit test project configuration |
| tools/Azure.Mcp.Tools.Compute/tests/Azure.Mcp.Tools.Compute.UnitTests/Disk/DiskGetCommandTests.cs | Unit tests for the disk get command |
| tools/Azure.Mcp.Tools.Compute/tests/Azure.Mcp.Tools.Compute.LiveTests/Azure.Mcp.Tools.Compute.LiveTests.csproj | Live test project configuration |
| tools/Azure.Mcp.Tools.Compute/tests/Azure.Mcp.Tools.Compute.LiveTests/ComputeCommandTests.cs | Live integration tests for Compute commands |
| servers/Azure.Mcp.Server/src/Program.cs | Registers ComputeSetup in the server's area list |
| servers/Azure.Mcp.Server/README.md | Adds Compute service documentation and examples |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Documents the compute_disk_get command usage |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Adds test prompts for Compute operations |
| servers/Azure.Mcp.Server/changelog-entries/1769107417230.yaml | Changelog entry for the new feature |
| Microsoft.Mcp.slnx | Adds Compute projects to solution |
| .github/CODEOWNERS | Adds code ownership for Compute tools |
...ols.Compute/tests/Azure.Mcp.Tools.Compute.UnitTests/Azure.Mcp.Tools.Compute.UnitTests.csproj
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Compute/src/Commands/Disk/DiskGetCommand.cs
Outdated
Show resolved
Hide resolved
haagha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left 2 comments
| { | ||
| base.RegisterOptions(command); | ||
| command.Options.Add(ComputeOptionDefinitions.Disk.AsOptional()); | ||
| command.Options.Add(OptionDefinitions.Common.ResourceGroup.AsOptional()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resource group should be getting used from the common options, it shouldn't need to be defined as a new option.
| # ServiceOwners: @kirill-linnik @kagbakpem @arazan | ||
|
|
||
| # PRLabel: %tools-Compute | ||
| /tools/Azure.Mcp.Tools.Compute/ @microsoft/azure-mcp @haagha @audreyttt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also add @g2vinay here
| | Tool Name | Test Prompt | | ||
| |:----------|:----------| | ||
| | compute_disk_get | List all managed disks in my subscription | | ||
| | compute_disk_get | Show me all disks in resource group <resource-group> | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would only show the managed disk I'm assuming so we should rewrite it to say show me all managed disks
| | compute_disk_get | List all managed disks in my subscription | | ||
| | compute_disk_get | Show me all disks in resource group <resource-group> | | ||
| | compute_disk_get | Get details of disk <disk-name> in resource group <resource-group> | | ||
| | compute_disk_get | How many disks do I have in my subscription? | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming we are only talking about managed disks correct?
What does this PR do?
This PR adds the azmcp-compute-disk-get command which mirrors the capabilities of the Get-AzDisk PowerShell command. This is one of our top used PowerShell commands. More disk tools are planned to be added in the future.
GitHub issue number?
(#1552)
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.json/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline