Skip to content

Migrate Storage Sync tools to new tool design and fix bugs in missing options#2950

Merged
alzimmermsft merged 2 commits into
microsoft:mainfrom
alzimmermsft:MigrateStorageSyncToNewToolDesign
Jun 25, 2026
Merged

Migrate Storage Sync tools to new tool design and fix bugs in missing options#2950
alzimmermsft merged 2 commits into
microsoft:mainfrom
alzimmermsft:MigrateStorageSyncToNewToolDesign

Conversation

@alzimmermsft

Copy link
Copy Markdown
Contributor

What does this PR do?

Migrates Storage Sync tools to new design where Register and Bind options are based on Option attributes. And fixes missing tags option in storagesync_service_create tool.

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

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 Storage Sync toolset to the newer “options POCO + [Option] attribute” design and updates commands to the SubscriptionCommand<TOptions, TResult> pattern, while also addressing a missing --tags option behavior for Storage Sync Service create/update flows.

Changes:

  • Converted Storage Sync option classes from System.CommandLine-style OptionDefinitions to attribute-based option binding ([Option], [OptionContainer]).
  • Updated Storage Sync commands to use SubscriptionCommand<..., ...> and adjusted service contracts (notably tags types).
  • Updated tests/recorded-assets metadata and live/integration test inputs for the new tags format.

Reviewed changes

Copilot reviewed 67 out of 67 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/StorageSyncCommandTests.cs Updates live/integration test to pass tags using the new key=value format.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/SyncGroup/SyncGroupGetCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/SyncGroup/SyncGroupDeleteCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/SyncGroup/SyncGroupCreateCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/StorageSyncService/StorageSyncServiceUpdateCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/StorageSyncService/StorageSyncServiceGetCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/StorageSyncService/StorageSyncServiceDeleteCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/StorageSyncService/StorageSyncServiceCreateCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/ServerEndpoint/ServerEndpointUpdateCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/ServerEndpoint/ServerEndpointGetCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/ServerEndpoint/ServerEndpointDeleteCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/ServerEndpoint/ServerEndpointCreateCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/RegisteredServer/RegisteredServerUpdateCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/RegisteredServer/RegisteredServerUnregisterCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/RegisteredServer/RegisteredServerGetCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/CloudEndpoint/CloudEndpointTriggerChangeDetectionCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/CloudEndpoint/CloudEndpointGetCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/CloudEndpoint/CloudEndpointDeleteCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/CloudEndpoint/CloudEndpointCreateCommandTests.cs Switches unit test base to subscription-aware test base.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/assets.json Updates recorded test asset tag pointer.
tools/Azure.Mcp.Tools.StorageSync/src/StorageSyncJsonContext.cs Simplifies json source-gen context to file-scoped partial declaration.
tools/Azure.Mcp.Tools.StorageSync/src/Services/StorageSyncService.cs Aligns update tags type to Dictionary<string, string> and simplifies tag assignment.
tools/Azure.Mcp.Tools.StorageSync/src/Services/IStorageSyncService.cs Updates service contract to accept Dictionary<string, string> tags for update operations.
tools/Azure.Mcp.Tools.StorageSync/src/Options/SyncGroup/SyncGroupGetOptions.cs Migrates sync group get options to [Option] attribute binding + subscription option interface.
tools/Azure.Mcp.Tools.StorageSync/src/Options/SyncGroup/SyncGroupDeleteOptions.cs Migrates sync group delete options to [Option] attribute binding + subscription option interface.
tools/Azure.Mcp.Tools.StorageSync/src/Options/SyncGroup/SyncGroupCreateOptions.cs Migrates sync group create options to [Option] attribute binding + subscription option interface.
tools/Azure.Mcp.Tools.StorageSync/src/Options/StorageSyncService/StorageSyncServiceUpdateOptions.cs Migrates update options to attribute binding and changes tags input to a string form.
tools/Azure.Mcp.Tools.StorageSync/src/Options/StorageSyncService/StorageSyncServiceGetOptions.cs Migrates get/list options to attribute binding and adds option-level validation rules.
tools/Azure.Mcp.Tools.StorageSync/src/Options/StorageSyncService/StorageSyncServiceDeleteOptions.cs Migrates delete options to attribute binding with required fields.
tools/Azure.Mcp.Tools.StorageSync/src/Options/StorageSyncService/StorageSyncServiceCreateOptions.cs Migrates create options to attribute binding and changes tags input to a string form.
tools/Azure.Mcp.Tools.StorageSync/src/Options/StorageSyncOptionDescriptions.cs Adds centralized option description constants for the new attribute-based model.
tools/Azure.Mcp.Tools.StorageSync/src/Options/StorageSyncOptionDefinitions.cs Removes old System.CommandLine option definitions.
tools/Azure.Mcp.Tools.StorageSync/src/Options/ServerEndpoint/ServerEndpointUpdateOptions.cs Migrates server endpoint update options to attribute binding.
tools/Azure.Mcp.Tools.StorageSync/src/Options/ServerEndpoint/ServerEndpointGetOptions.cs Migrates server endpoint get options to attribute binding.
tools/Azure.Mcp.Tools.StorageSync/src/Options/ServerEndpoint/ServerEndpointDeleteOptions.cs Migrates server endpoint delete options to attribute binding.
tools/Azure.Mcp.Tools.StorageSync/src/Options/ServerEndpoint/ServerEndpointCreateOptions.cs Migrates server endpoint create options to attribute binding.
tools/Azure.Mcp.Tools.StorageSync/src/Options/RegisteredServer/RegisteredServerUpdateOptions.cs Migrates registered server update options to attribute binding.
tools/Azure.Mcp.Tools.StorageSync/src/Options/RegisteredServer/RegisteredServerUnregisterOptions.cs Migrates unregister options to attribute binding.
tools/Azure.Mcp.Tools.StorageSync/src/Options/RegisteredServer/RegisteredServerGetOptions.cs Migrates get/list options to attribute binding.
tools/Azure.Mcp.Tools.StorageSync/src/Options/CloudEndpoint/CloudEndpointTriggerChangeDetectionOptions.cs Migrates change detection options to attribute binding (including array inputs).
tools/Azure.Mcp.Tools.StorageSync/src/Options/CloudEndpoint/CloudEndpointGetOptions.cs Migrates cloud endpoint get/list options to attribute binding.
tools/Azure.Mcp.Tools.StorageSync/src/Options/CloudEndpoint/CloudEndpointDeleteOptions.cs Migrates cloud endpoint delete options to attribute binding.
tools/Azure.Mcp.Tools.StorageSync/src/Options/CloudEndpoint/CloudEndpointCreateOptions.cs Migrates cloud endpoint create options to attribute binding.
tools/Azure.Mcp.Tools.StorageSync/src/Options/BaseStorageSyncOptions.cs Removes legacy base options type (now replaced by ISubscriptionOption POCOs).
tools/Azure.Mcp.Tools.StorageSync/src/GlobalUsings.cs Removes global System.CommandLine using (no longer needed).
tools/Azure.Mcp.Tools.StorageSync/src/Commands/SyncGroup/SyncGroupGetCommand.cs Migrates command to SubscriptionCommand<,> and attribute-bound options.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/SyncGroup/SyncGroupDeleteCommand.cs Migrates command to SubscriptionCommand<,> and attribute-bound options.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/SyncGroup/SyncGroupCreateCommand.cs Migrates command to SubscriptionCommand<,> and attribute-bound options.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/StorageSyncService/StorageSyncServiceUpdateCommand.cs Migrates command to SubscriptionCommand<,> and adds tags string parsing at call site.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/StorageSyncService/StorageSyncServiceGetCommand.cs Migrates command to SubscriptionCommand<,> and moves resource-group/name validation into ValidateOptions.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/StorageSyncService/StorageSyncServiceDeleteCommand.cs Migrates command to SubscriptionCommand<,> and attribute-bound options.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/StorageSyncService/StorageSyncServiceCreateCommand.cs Migrates command to SubscriptionCommand<,> and adds tags string parsing at call site.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/ServerEndpoint/ServerEndpointUpdateCommand.cs Migrates command to SubscriptionCommand<,> and attribute-bound options.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/ServerEndpoint/ServerEndpointGetCommand.cs Migrates command to SubscriptionCommand<,> and updates help text for correct option usage.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/ServerEndpoint/ServerEndpointDeleteCommand.cs Migrates command to SubscriptionCommand<,> and attribute-bound options.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/ServerEndpoint/ServerEndpointCreateCommand.cs Migrates command to SubscriptionCommand<,> and attribute-bound options.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/RegisteredServer/RegisteredServerUpdateCommand.cs Migrates command to SubscriptionCommand<,> and retains “update” call path.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/RegisteredServer/RegisteredServerUnregisterCommand.cs Migrates command to SubscriptionCommand<,> and attribute-bound options.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/RegisteredServer/RegisteredServerGetCommand.cs Migrates command to SubscriptionCommand<,> and attribute-bound options.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/CloudEndpoint/CloudEndpointTriggerChangeDetectionCommand.cs Migrates command to SubscriptionCommand<,> and attribute-bound options.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/CloudEndpoint/CloudEndpointGetCommand.cs Migrates command to SubscriptionCommand<,> and attribute-bound options.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/CloudEndpoint/CloudEndpointDeleteCommand.cs Migrates command to SubscriptionCommand<,> and attribute-bound options.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/CloudEndpoint/CloudEndpointCreateCommand.cs Migrates command to SubscriptionCommand<,> and streamlines response creation.
tools/Azure.Mcp.Tools.StorageSync/src/Commands/BaseStorageSyncCommand.cs Removes old base command wrapper (no longer needed with attribute-based options).
tools/Azure.Mcp.Tools.StorageSync/src/Azure.Mcp.Tools.StorageSync.csproj Switches core project reference to $(RepoRoot) form and removes direct System.CommandLine package ref.
servers/Azure.Mcp.Server/changelog-entries/1782412345167.yaml Adds breaking-change changelog entry for removed parameters.
servers/Azure.Mcp.Server/changelog-entries/1782412330746.yaml Adds bug-fix changelog entry for missing tags option (contains a typo).
Comments suppressed due to low confidence (2)

tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/StorageSyncService/StorageSyncServiceCreateCommandTests.cs:22

  • This test suite only asserts command metadata and does not cover the modified option binding/validation and tag parsing behavior (e.g., --tags parsing and invalid formats). Add unit tests that validate parsing of tags into the expected dictionary and that malformed tag strings produce a validation error response.
    tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/StorageSyncService/StorageSyncServiceUpdateCommandTests.cs:18
  • This test suite only asserts command metadata and does not cover the modified option binding/validation and tag parsing behavior (e.g., --tags parsing and invalid formats). Add unit tests that validate parsing of tags into the expected dictionary and that malformed tag strings produce a validation error response.

Comment thread servers/Azure.Mcp.Server/changelog-entries/1782412330746.yaml Outdated
@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure MCP Server Jun 25, 2026
@alzimmermsft alzimmermsft merged commit bb1f385 into microsoft:main Jun 25, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Jun 25, 2026
@alzimmermsft alzimmermsft deleted the MigrateStorageSyncToNewToolDesign branch June 25, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants