Skip to content

Migrate AppConfig tools to new tool design#2871

Open
alzimmermsft wants to merge 2 commits into
microsoft:mainfrom
alzimmermsft:MigrateAppConfigToNewToolDesign
Open

Migrate AppConfig tools to new tool design#2871
alzimmermsft wants to merge 2 commits into
microsoft:mainfrom
alzimmermsft:MigrateAppConfigToNewToolDesign

Conversation

@alzimmermsft

Copy link
Copy Markdown
Contributor

What does this PR do?

Migrates AppConfig tools to new design where Register and Bind options are based on Option attributes.

GitHub issue number?

[Link to the GitHub issue this PR addresses]

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Created a changelog entry if the change falls among the following: new feature, bug fix, UI/UX update, breaking change, or updated dependencies. Follow the changelog entry guide
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes running the script ./eng/scripts/Process-PackageReadMe.ps1. See Package README
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • For renamed tools, follow the Tool Rename Checklist and tag the PR with the breaking-change label
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated command list in servers/Azure.Mcp.Server/docs/azmcp-commands.md
    • Ran ./eng/scripts/Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • Updated test prompts in servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

@alzimmermsft alzimmermsft requested a review from conniey as a code owner June 12, 2026 19:58
Copilot AI review requested due to automatic review settings June 12, 2026 19:58
@alzimmermsft alzimmermsft requested review from a team and JonathanCrd as code owners June 12, 2026 19:58
@alzimmermsft alzimmermsft requested a review from a team as a code owner June 12, 2026 19:58
@github-actions github-actions Bot added the tools-AppConfig AppConfig label Jun 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the Azure App Configuration tool commands from the legacy RegisterOptions/BindOptions(ParseResult) pattern to the newer attribute-based options model ([Option] on POCOs) and SubscriptionCommand<TOptions, TResult> execution, aligning AppConfig with the newer tool design used elsewhere in the repo.

Changes:

  • Refactors AppConfig commands to use typed options + SubscriptionCommand<,> (injecting ISubscriptionResolver) instead of parsing ParseResult.
  • Replaces legacy AppConfig option definition/base option types with [Option]-annotated options POCOs and shared description constants.
  • Updates AppConfig unit tests to use SubscriptionCommandUnitTestsBase to satisfy the new subscription resolver dependency.

Invoking Livetests

Copilot submitted PRs are not trustworthy by default. Users with write access to the repo need to validate the contents of this PR before leaving a comment with the text /azp run mcp - pullrequest - live. This will trigger the necessary livetest workflows to complete required validation.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/Azure.Mcp.Tools.AppConfig/tests/Azure.Mcp.Tools.AppConfig.Tests/KeyValue/KeyValueSetCommandTests.cs Switches test base class to support new subscription-aware command pattern.
tools/Azure.Mcp.Tools.AppConfig/tests/Azure.Mcp.Tools.AppConfig.Tests/KeyValue/KeyValueGetCommandTests.cs Switches test base class to support new subscription-aware command pattern.
tools/Azure.Mcp.Tools.AppConfig/tests/Azure.Mcp.Tools.AppConfig.Tests/KeyValue/KeyValueDeleteCommandTests.cs Switches test base class to support new subscription-aware command pattern.
tools/Azure.Mcp.Tools.AppConfig/tests/Azure.Mcp.Tools.AppConfig.Tests/Account/AccountListCommandTests.cs Switches test base class to support new subscription-aware command pattern.
tools/Azure.Mcp.Tools.AppConfig/src/Options/KeyValue/Lock/KeyValueLockSetOptions.cs Migrates lock options to [Option]-based POCO binding.
tools/Azure.Mcp.Tools.AppConfig/src/Options/KeyValue/KeyValueSetOptions.cs Migrates set options to [Option]-based POCO binding (including tags/value/content-type).
tools/Azure.Mcp.Tools.AppConfig/src/Options/KeyValue/KeyValueGetOptions.cs Migrates get options to [Option]-based POCO binding (key/filters).
tools/Azure.Mcp.Tools.AppConfig/src/Options/KeyValue/KeyValueDeleteOptions.cs Migrates delete options to [Option]-based POCO binding.
tools/Azure.Mcp.Tools.AppConfig/src/Options/KeyValue/BaseKeyValueOptions.cs Removes legacy base options type (no longer needed with POCO binding).
tools/Azure.Mcp.Tools.AppConfig/src/Options/BaseAppConfigOptions.cs Removes legacy base options type (superseded by POCO binding).
tools/Azure.Mcp.Tools.AppConfig/src/Options/AppConfigOptionDescriptions.cs Adds shared option description constants for AppConfig options.
tools/Azure.Mcp.Tools.AppConfig/src/Options/AppConfigOptionDefinitions.cs Removes legacy System.CommandLine.Option definitions (superseded by POCO binding).
tools/Azure.Mcp.Tools.AppConfig/src/Options/Account/AccountListOptions.cs Migrates account list options to [Option]-based POCO binding.
tools/Azure.Mcp.Tools.AppConfig/src/GlobalUsings.cs Removes global usings that are no longer needed after migration away from direct System.CommandLine usage in commands.
tools/Azure.Mcp.Tools.AppConfig/src/Commands/KeyValue/Lock/KeyValueLockSetCommand.cs Refactors command to typed options + SubscriptionCommand<,> and seals result record.
tools/Azure.Mcp.Tools.AppConfig/src/Commands/KeyValue/KeyValueSetCommand.cs Refactors command to typed options + SubscriptionCommand<,> and seals result record.
tools/Azure.Mcp.Tools.AppConfig/src/Commands/KeyValue/KeyValueGetCommand.cs Refactors command to typed options + SubscriptionCommand<,> and moves validation to ValidateOptions.
tools/Azure.Mcp.Tools.AppConfig/src/Commands/KeyValue/KeyValueDeleteCommand.cs Refactors command to typed options + SubscriptionCommand<,> and seals result record.
tools/Azure.Mcp.Tools.AppConfig/src/Commands/KeyValue/BaseKeyValueCommand.cs Removes legacy base command class (no longer needed with POCO binding).
tools/Azure.Mcp.Tools.AppConfig/src/Commands/BaseAppConfigCommand.cs Removes legacy base command class (no longer needed with POCO binding).
tools/Azure.Mcp.Tools.AppConfig/src/Commands/Account/AccountListCommand.cs Refactors command to typed options + SubscriptionCommand<,> and seals result record.
servers/Azure.Mcp.Server/changelog-entries/1781294298905.yaml Adds a changelog entry for the AppConfig tool change.

/// <summary>
/// Common option descriptions for App Configuration.
/// </summary>
public static class AppConfigOptionDescriptions
Comment thread servers/Azure.Mcp.Server/changelog-entries/1781294298905.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants