Repository navigation
Add support for Azure NetApp Files Accounts create, get, update - #3708
Christian Stump (stumpc) wants to merge 25 commits into
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
|
Thank you for your contribution Christian Stump (@stumpc)! We will review the pull request and get back to you soon. |
|
/azp run mcp - pullrequest - live |
|
Commenter does not have sufficient privileges for PR 3708 in repo microsoft/mcp |
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
|
I'm still actively figuring out issues I have with getting any of my subscriptions to let me run the recorded test code to generate those fixtures, which that should be the big thing making the builds red at the moment. |
There was a problem hiding this comment.
🟡 Changes recommended
Recorded tests lack committed playback assets, and an added unit-test file is not included in any test project.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR adds Azure NetApp Files account management support to the Azure MCP server.
Changes:
- Adds account create, get, and update commands with validation and ARM integration.
- Adds unit/live tests and test-resource infrastructure.
- Registers the toolset and updates documentation, metadata, packaging, and ownership.
File summaries
| File | Description |
|---|---|
.vscode/cspell.json |
Adds NetApp terminology. |
.github/CODEOWNERS |
Adds tool ownership. |
Directory.Packages.props |
Adds the NetApp SDK package. |
Microsoft.Mcp.slnx |
Registers projects. |
servers/Azure.Mcp.Server/Azure.Mcp.Server.slnx |
Registers server projects. |
servers/Azure.Mcp.Server/src/Program.cs |
Registers the toolset. |
servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json |
Adds consolidated mappings. |
servers/Azure.Mcp.Server/README.md |
Lists Azure NetApp Files support. |
servers/Azure.Mcp.Server/docs/e2eTestPrompts.md |
Adds test prompts. |
servers/Azure.Mcp.Server/docs/azmcp-commands.md |
Documents commands. |
servers/Azure.Mcp.Server/changelog-entries/stumpc-netappfiles-account.yaml |
Adds changelog entry. |
tools/Azure.Mcp.Tools.NetAppFiles/src/Azure.Mcp.Tools.NetAppFiles.csproj |
Defines the tool project. |
tools/Azure.Mcp.Tools.NetAppFiles/src/AssemblyInfo.cs |
Enables test access. |
tools/Azure.Mcp.Tools.NetAppFiles/src/NetAppFilesSetup.cs |
Registers commands and services. |
tools/Azure.Mcp.Tools.NetAppFiles/src/Commands/Account/AccountCreateCommand.cs |
Implements account creation. |
tools/Azure.Mcp.Tools.NetAppFiles/src/Commands/Account/AccountGetCommand.cs |
Implements account retrieval. |
tools/Azure.Mcp.Tools.NetAppFiles/src/Commands/Account/AccountUpdateCommand.cs |
Implements account updates. |
tools/Azure.Mcp.Tools.NetAppFiles/src/Commands/NetAppFilesJsonContext.cs |
Registers JSON models. |
tools/Azure.Mcp.Tools.NetAppFiles/src/Models/NetAppFilesAccount.cs |
Defines the response model. |
tools/Azure.Mcp.Tools.NetAppFiles/src/Options/Account/AccountCreateOptions.cs |
Defines create options. |
tools/Azure.Mcp.Tools.NetAppFiles/src/Options/Account/AccountGetOptions.cs |
Defines get options. |
tools/Azure.Mcp.Tools.NetAppFiles/src/Options/Account/AccountUpdateOptions.cs |
Defines update options. |
tools/Azure.Mcp.Tools.NetAppFiles/src/Services/INetAppFilesAccountService.cs |
Defines the service contract. |
tools/Azure.Mcp.Tools.NetAppFiles/src/Services/NetAppFilesAccountService.cs |
Implements ARM operations. |
tools/Azure.Mcp.Tools.NetAppFiles/src/Validation/AccountNameValidator.cs |
Validates account names. |
tools/Azure.Mcp.Tools.NetAppFiles/tests/test-resources.bicep |
Configures live-test RBAC. |
tools/Azure.Mcp.Tools.NetAppFiles/tests/test-resources-post.ps1 |
Generates test settings. |
tools/Azure.Mcp.Tools.NetAppFiles/tests/Azure.Mcp.Tools.NetAppFiles.Tests/Azure.Mcp.Tools.NetAppFiles.Tests.csproj |
Defines the test project. |
tools/Azure.Mcp.Tools.NetAppFiles/tests/Azure.Mcp.Tools.NetAppFiles.Tests/assets.json |
Configures recorded-test assets. |
tools/Azure.Mcp.Tools.NetAppFiles/tests/Azure.Mcp.Tools.NetAppFiles.Tests/NetAppFilesCommandTests.cs |
Adds recorded live tests. |
tools/Azure.Mcp.Tools.NetAppFiles/tests/Azure.Mcp.Tools.NetAppFiles.Tests/Account/AccountCreateCommandTests.cs |
Tests account creation. |
tools/Azure.Mcp.Tools.NetAppFiles/tests/Azure.Mcp.Tools.NetAppFiles.Tests/Account/AccountGetCommandTests.cs |
Tests account retrieval. |
tools/Azure.Mcp.Tools.NetAppFiles/tests/Azure.Mcp.Tools.NetAppFiles.Tests/Account/AccountUpdateCommandTests.cs |
Tests account updates. |
tools/Azure.Mcp.Tools.NetAppFiles/tests/Azure.Mcp.Tools.NetAppFiles.UnitTests/SnapshotPolicy/SnapshotPolicyUpdateCommandTests.cs |
Adds an unregistered test file. |
Review details
- Files reviewed: 34/34 changed files
- Comments generated: 7
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Id = "a63649c2-caaa-4744-a35b-6a67db0527b7", | ||
| Name = "create", | ||
| Title = "Create Azure NetApp Files Account", | ||
| Description = "Creates an Azure NetApp Files account in a specified resource group and region. Returns the account name, resource ID, location, and provisioning state.", |
There was a problem hiding this comment.
This is another one I'm having some trouble with my environment on, as the model I've deployed to run the ToolEvaluationDescriptor against just keeps returning empty strings for some reason and I haven't quite figured out why yet. Getting there though.
| Id = "a63649c2-caaa-4744-a35b-6a67db0527b7", | ||
| Name = "create", | ||
| Title = "Create Azure NetApp Files Account", | ||
| Description = "Creates an Azure NetApp Files account in a specified resource group and region. Returns the account name, resource ID, location, and provisioning state.", |
KarishmaGhiya
left a comment
There was a problem hiding this comment.
Thanks for the PR! I reviewed it against the add-azure-mcp-tools skill checklist and compared it with existing toolsets (Storage, SQL, FileShares, ManagedLustre).
Blocking
-
AccountCreateCommandmetadata (Idempotent = true): Callingcreatetwice with the same account does not give the same result, because the service throws "already exists" on the second call. StorageAccountCreateand SQLServerCreateuseIdempotent = false. Please set it tofalseand updateazmcp-commands.mdandconsolidated-tools.jsonto match. The consolidated toolcreate_or_update_azure_netapp_files_accountscurrently reportsidempotent: truefor both create and update. -
NetAppFilesAccountService.CreateAccountAsyncexistence pre-check: TheGetNetAppAccountAsyncpre-check adds an extra ARM call and throwsInvalidOperationException, which most likely surfaces as a 500 (please verify against the baseGetStatusCode). Storage and SQL let ARM return the 409 and map it inGetErrorMessage. Note thatCreateOrUpdateAsyncwould silently update an existing account, so if you want create-only semantics, please keep the check but return a 409. Otherwise remove it. -
PR description: Please add the Tool Description Evaluator score (>= 0.4, top 3 ranking) for all three tools, the GitHub issue link, and a link to the Azure NetApp Files docs. The pre-merge checklist is also still unchecked.
Should fix
-
AccountCreateCommanderror handling:GetErrorMessagehandlesKeyNotFoundException, but there is noGetStatusCodeoverride.getandupdatehave one, so a missing resource group oncreatereturns the wrong status. Please add the same override. -
servers/Azure.Mcp.Server/README.md: The NetApp Files entry has no emoji like its neighbors and sits between PostgreSQL and Device Registry, so please move it to a sensible spot. Per the skill (5d), please also add example prompts to the "What can you do" section. -
azmcp-commands.md: Please confirm./eng/scripts/Update-AzCommandsMetadata.ps1was run, because CI fails without it. The new section also sits before MySQL, so please check alphabetical placement.
Nits and questions
AccountCreateOptionsandAccountGetOptionsaren'tsealed, butAccountUpdateOptionsis. Please make them consistent.- Tests: please add a case for updating
--nfs-v4-id-domainalone, and check that live tests clean up the accounts they create. test-resources.biceponly assigns Contributor and outputs an unusedNETAPP_ACCOUNT_NAME. Is that output needed?- Please confirm the AOT native build (
./eng/scripts/Build-Local.ps1 -BuildNative),dotnet formatand cspell all pass.
Positives
- Fixed, non-revealing error messages and the
AccountNameValidatorwith negative tests are good.
…ses, clean up tests, flag create not idempotent
…g to create something that exists
…nt name filter optional, add tests
What does this PR do?
This PR is for adding Azure NetAppFiles Account object create/read/update support to the Azure MCP. This includes tools for
create,get, andupdateactions.GitHub issue number?
#3966
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 PipelineDocumentation
Azure NetApp Files Documentation: https://learn.microsoft.com/en-us/azure/azure-netapp-files/