Consolidate KeyVault get/list tools#1653
Merged
g2vinay merged 15 commits intomicrosoft:mainfrom Feb 12, 2026
Merged
Conversation
3e88fd2 to
7fe5a6b
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR consolidates Azure Key Vault get and list operations by removing the dedicated list commands (keys/secrets/certificates) and extending the existing get commands to also support listing when the name argument is omitted.
Changes:
- Removed Key Vault
listcommands/options/tests for keys, secrets, and certificates. - Updated Key Vault
getcommands to treat the name option as optional and list items when not provided. - Updated tool consolidation + one core tools-list test to reflect the new command surface area.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.UnitTests/Secret/SecretListCommandTests.cs | Removed tests for deleted secret list command. |
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.UnitTests/Secret/SecretGetCommandTests.cs | Updated to validate both “get single” and “list names” behaviors via secret get. |
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.UnitTests/Key/KeyListCommandTests.cs | Removed tests for deleted key list command. |
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.UnitTests/Key/KeyGetCommandTests.cs | Updated to validate both “get single” and “list names” behaviors via key get (incl. managed keys flag). |
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.UnitTests/Certificate/CertificateListCommandTests.cs | Removed tests for deleted certificate list command. |
| tools/Azure.Mcp.Tools.KeyVault/tests/Azure.Mcp.Tools.KeyVault.UnitTests/Certificate/CertificateGetCommandTests.cs | Updated to validate list-via-get behavior and error handling. |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/Secret/SecretListOptions.cs | Removed options type for deleted secret list command. |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/Key/KeyListOptions.cs | Removed options type for deleted key list command. |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/Key/KeyGetOptions.cs | Added IncludeManagedKeys to support list-via-get. |
| tools/Azure.Mcp.Tools.KeyVault/src/Options/Certificate/CertificateListOptions.cs | Removed options type for deleted certificate list command. |
| tools/Azure.Mcp.Tools.KeyVault/src/KeyVaultSetup.cs | Removed DI + registration for Key Vault list commands. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Secret/SecretListCommand.cs | Removed secret list command implementation. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Secret/SecretGetCommand.cs | Added list-via-get behavior and updated result shape. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/KeyVaultJsonContext.cs | Updated source-gen types for new/nested result models (removed list result models). |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Key/KeyListCommand.cs | Removed key list command implementation. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Key/KeyGetCommand.cs | Added list-via-get behavior (incl. include-managed) and updated result shape. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Certificate/CertificateListCommand.cs | Removed certificate list command implementation. |
| tools/Azure.Mcp.Tools.KeyVault/src/Commands/Certificate/CertificateGetCommand.cs | Added list-via-get behavior and updated result shape. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Partial doc edits around Key Vault list commands (still needs alignment with removed commands). |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Tools/UnitTests/ToolsListCommandTests.cs | Updated expected known Key Vault command from list to get. |
| core/Azure.Mcp.Core/src/Areas/Server/Resources/consolidated-tools.json | Removed Key Vault list tools from consolidated mapping and adjusted Key Vault tool grouping. |
- Update e2eTestPrompts.md: change keyvault_*_list to keyvault_*_get for listing prompts - Update ToolDescriptionEvaluator README and prompts.json: consolidate list prompts into get tool definitions - Update KeyVaultCommandTests.cs: update live tests to use consolidated get commands for list operations This completes the KeyVault get/list consolidation by ensuring all documentation, test prompts, and tests reference the consolidated commands.
Changed error logging from 'is null' to 'string.IsNullOrEmpty()' to match the execution logic. This ensures error messages accurately reflect the operation being performed (listing vs getting a specific item). Without this fix, if a parameter is an empty string, the code would list items but log errors as if getting a specific item, creating misleading error messages. Affected commands: - SecretGetCommand.cs (line 105) - KeyGetCommand.cs (line 108) - CertificateGetCommand.cs (line 113)
Contributor
alzimmermsft
left a comment
There was a problem hiding this comment.
Need a CHANGELOG entry
vcolin7
reviewed
Feb 10, 2026
Contributor
vcolin7
left a comment
There was a problem hiding this comment.
Outside of Alan's comments, the changes look good to me. I'd like to see the results of TDE testing (a screenshot should suffice) to see we did not introduce any regressions with tool description updates :)
vcolin7
approved these changes
Feb 11, 2026
anannya03
approved these changes
Feb 12, 2026
colbytimm
pushed a commit
to colbytimm/microsoft-mcp
that referenced
this pull request
Apr 20, 2026
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.
No description provided.