Migrate Key Vault tools to new tool design#3080
Open
alzimmermsft wants to merge 1 commit into
Open
Conversation
alzimmermsft
requested review from
a team,
JonathanCrd,
danield137,
prvavill and
vcolin7
as code owners
July 17, 2026 14:42
alzimmermsft
requested review from
JasonYeMSFT,
anannya03,
hallipr,
sandeep-sen,
vukelich and
xirzec
July 17, 2026 14:42
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request migrates the Azure Key Vault toolset to the newer option-binding design (options declared via [Option] attributes and bound through the shared binder), updating commands, options, and tests accordingly.
Changes:
- Refactors Key Vault commands to use the
SubscriptionCommand<TOptions, TResult>pattern andISubscriptionResolver, removing manualRegisterOptions/BindOptionslogic. - Replaces legacy Key Vault option definitions with attribute-based option POCOs, and introduces strongly-typed response models (
*Details) registered in the Key Vault JSON source-gen context. - Updates Key Vault unit tests to use the subscription-aware test base and new result model shapes.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.Kusto/src/Azure.Mcp.Tools.Kusto.csproj | Updates core project reference path and removes System.CommandLine package reference. |
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.Tests/Secret/SecretGetCommandTests.cs | Moves to subscription-aware test base. |
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.Tests/Secret/SecretCreateCommandTests.cs | Moves to subscription-aware test base and updates deserialization target type. |
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.Tests/Key/KeyGetCommandTests.cs | Moves to subscription-aware test base. |
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.Tests/Key/KeyCreateCommandTests.cs | Moves to subscription-aware test base and updates deserialization target type / validation assertions. |
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.Tests/Certificate/CertificateImportCommandTests.cs | Moves to subscription-aware test base and removes env-dependent skip logic. |
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.Tests/Certificate/CertificateGetCommandTests.cs | Moves to subscription-aware test base. |
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.Tests/Certificate/CertificateCreateCommandTests.cs | Moves to subscription-aware test base and updates validation assertions. |
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.Tests/Admin/AdminSettingsGetCommandTests.cs | Updates validation scenarios and removes env-var subscription handling. |
| tools/Azure.Mcp.Tools.KeyVault/src/Services/KeyVaultService.cs | Simplifies construction and uses TenantService for HTTP client creation and cloud selection. |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/Secret/SecretGetOptions.cs | Converts to attribute-based options (Secret), sealed type. |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/Secret/SecretCreateOptions.cs | Converts to attribute-based options with required members (Secret, Value). |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/KeyVaultOptionDescriptions.cs | Adds shared option description constants for Key Vault-specific options. |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/KeyVaultOptionDefinitions.cs | Removes legacy System.CommandLine option definitions. |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/Key/KeyGetOptions.cs | Converts to attribute-based options (Key, IncludeManaged). |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/Key/KeyCreateOptions.cs | Converts to attribute-based options with required members (Key, KeyType). |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/Certificate/CertificateImportOptions.cs | Converts to attribute-based options with required members (Certificate, CertificateData). |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/Certificate/CertificateGetOptions.cs | Converts to attribute-based options (Certificate). |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/Certificate/CertificateCreateOptions.cs | Converts to attribute-based options with required member (Certificate). |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/BaseKeyVaultOptions.cs | Replaces inheritance-based options with explicit [Option] / [OptionContainer] properties and ISubscriptionOption. |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/Admin/AdminSettingsGetOptions.cs | Removes now-unnecessary options type. |
| tools/Azure.Mcp.Tools.KeyVault/src/Models/SecretDetails.cs | Introduces response model for secret details. |
| tools/Azure.Mcp.Tools.KeyVault/src/Models/KeyDetails.cs | Introduces response model for key details. |
| tools/Azure.Mcp.Tools.KeyVault/src/Models/CertificateDetails.cs | Introduces response model for certificate details. |
| tools/Azure.Mcp.Tools.KeyVault/src/GlobalUsings.cs | Removes global System.CommandLine using. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Secret/SecretGetCommand.cs | Migrates to new command base and new result model types. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Secret/SecretCreateCommand.cs | Migrates to new command base and returns SecretDetails. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/KeyVaultJsonContext.cs | Updates source-gen registrations to new model/result types. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Key/KeyGetCommand.cs | Migrates to new command base and new result model types. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Key/KeyCreateCommand.cs | Migrates to new command base and returns KeyDetails. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Certificate/CertificateImportCommand.cs | Migrates to new command base and returns CertificateDetails. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Certificate/CertificateGetCommand.cs | Migrates to new command base and new result model types. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Certificate/CertificateCreateCommand.cs | Migrates to new command base and returns CertificateDetails. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Admin/AdminSettingsGetCommand.cs | Migrates to new command base and new options binding. |
| tools/Azure.Mcp.Tools.KeyVault/src/Azure.Mcp.Tools.KeyVault.csproj | Updates core project reference path and removes System.CommandLine package reference. |
| servers/Azure.Mcp.Server/changelog-entries/1784299285211.yaml | Adds breaking-change note for Key Vault parameter removals. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Migrates Key Vault tools to new design where Register and Bind options are based on
Optionattributes.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