Skip to content

Migrate Deploy tools to new tool design#3090

Open
alzimmermsft wants to merge 1 commit into
microsoft:mainfrom
alzimmermsft:MigrateDeployToolsToNewDesign
Open

Migrate Deploy tools to new tool design#3090
alzimmermsft wants to merge 1 commit into
microsoft:mainfrom
alzimmermsft:MigrateDeployToolsToNewDesign

Conversation

@alzimmermsft

Copy link
Copy Markdown
Contributor

What does this PR do?

Migrates Deploy 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 self-assigned this Jul 17, 2026
Copilot AI review requested due to automatic review settings July 17, 2026 21:42
@alzimmermsft
alzimmermsft requested review from a team, wchigit and xfz11 as code owners July 17, 2026 21:42
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

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 Deploy toolset commands from the legacy RegisterOptions/BindOptions pattern to the newer options binding model driven by [Option] attributes, aligning Deploy with the repo’s current command design.

Changes:

  • Converted Deploy command option models to [Option]-attributed POCOs and updated commands to the newer BaseCommand<TOptions, TResult> / SubscriptionCommand<TOptions, TResult> execute signatures.
  • Removed legacy option-definition helpers (DeployOptionDefinitions, JsonSchemaLoader, GlobalUsings, System.CommandLine dependency) and refactored supporting utilities.
  • Updated tests, docs, and added a changelog entry reflecting breaking parameter surface changes.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tools/Azure.Mcp.Tools.Deploy/tests/Azure.Mcp.Tools.Deploy.Tests/Commands/Pipeline/GuidanceGetCommandTests.cs Updates tests to reflect new options binding and removed subscription arg.
tools/Azure.Mcp.Tools.Deploy/tests/Azure.Mcp.Tools.Deploy.Tests/Commands/Architecture/DiagramGenerateCommandTests.cs Updates expected validation error message for invalid JSON input.
tools/Azure.Mcp.Tools.Deploy/tests/Azure.Mcp.Tools.Deploy.Tests/Commands/App/LogsGetCommandTests.cs Switches to subscription-aware unit test base to match command inheritance changes.
tools/Azure.Mcp.Tools.Deploy/src/Services/Util/PipelineGenerationUtil.cs Renames/normalizes AZD option property usage (IsAzdProject).
tools/Azure.Mcp.Tools.Deploy/src/Services/Util/JsonSchemaLoader.cs Removes embedded-resource schema loading helper (deleted).
tools/Azure.Mcp.Tools.Deploy/src/Services/Util/IaCRulesTemplateUtil.cs Simplifies helper methods and removes unused parameters.
tools/Azure.Mcp.Tools.Deploy/src/Services/Util/DeploymentPlanTemplateUtil.cs Refactors string comparisons and simplifies some helper methods.
tools/Azure.Mcp.Tools.Deploy/src/Services/Util/AzdResourceLogService.cs Adds missing file header and updates Azure Monitor logs namespace usage.
tools/Azure.Mcp.Tools.Deploy/src/Services/Util/AzdAppLogRetriever.cs Modernizes collection initializations and simplifies small helpers.
tools/Azure.Mcp.Tools.Deploy/src/Services/Templates/TemplateService.cs Removes trailing whitespace-only line.
tools/Azure.Mcp.Tools.Deploy/src/Schemas/DeployAppTopologySchema.cs Adds a compiled-in schema string to replace embedded schema loading.
tools/Azure.Mcp.Tools.Deploy/src/Options/Plan/GetOptions.cs Migrates plan options to [Option] attributes and adds subscription/resource-group options.
tools/Azure.Mcp.Tools.Deploy/src/Options/Pipeline/GuidanceGetOptions.cs Migrates pipeline guidance options to [Option] attributes and renames AZD flag property.
tools/Azure.Mcp.Tools.Deploy/src/Options/Infrastructure/RulesGetOptions.cs Migrates IaC rules options to [Option] attributes and adjusts required/optional fields.
tools/Azure.Mcp.Tools.Deploy/src/Options/DeployOptionDefinitions.cs Removes legacy option-definition container (deleted).
tools/Azure.Mcp.Tools.Deploy/src/Options/Architecture/DiagramGenerateOptions.cs Migrates raw JSON input option to [Option] attributes using the new schema constant.
tools/Azure.Mcp.Tools.Deploy/src/Options/App/LogsGetOptions.cs Migrates app logs options to [Option] attributes and implements subscription option interface.
tools/Azure.Mcp.Tools.Deploy/src/Models/PipelineParameters.cs Adds file header.
tools/Azure.Mcp.Tools.Deploy/src/Models/IaCRulesParameters.cs Adds file header.
tools/Azure.Mcp.Tools.Deploy/src/GlobalUsings.cs Removes global usings tied to the old design (deleted).
tools/Azure.Mcp.Tools.Deploy/src/Commands/Plan/GetCommand.cs Converts to the new execute signature and defaults option values when absent.
tools/Azure.Mcp.Tools.Deploy/src/Commands/Pipeline/GuidanceGetCommand.cs Converts to the new execute signature and removes legacy binding/registration.
tools/Azure.Mcp.Tools.Deploy/src/Commands/Infrastructure/RulesGetCommand.cs Converts to the new execute signature and adjusts resource-types parsing.
tools/Azure.Mcp.Tools.Deploy/src/Commands/Infrastructure/GenerateMermaidChart.cs Refactors naming and simplifies helper methods.
tools/Azure.Mcp.Tools.Deploy/src/Commands/DeployJsonContext.cs Simplifies JSON context declaration to file-scoped type form.
tools/Azure.Mcp.Tools.Deploy/src/Commands/Architecture/DiagramGenerateCommand.cs Moves validation into ValidateOptions and updates execution flow for new binding.
tools/Azure.Mcp.Tools.Deploy/src/Commands/App/LogsGetCommand.cs Updates to SubscriptionCommand<TOptions, TResult> pattern and uses subscription resolver.
tools/Azure.Mcp.Tools.Deploy/src/Azure.Mcp.Tools.Deploy.csproj Removes System.CommandLine dependency and adjusts ProjectReference pathing.
servers/Azure.Mcp.Server/docs/azmcp-commands.md Updates schema reference link for architecture diagram command (currently broken).
servers/Azure.Mcp.Server/changelog-entries/1784324484568.yaml Adds breaking-change entry for Deploy parameter surface updates.

}
return Task.FromResult(context.Response);

return context.Response;
HandleException(context, ex);
}
return Task.FromResult(context.Response);
return context.Response;
HandleException(context, ex);
}
return Task.FromResult(context.Response);
return context.Response;
}

return Task.FromResult(context.Response);
return context.Response;
[--limit <limit>]

# Generate a mermaid architecture diagram for the application topology follow the schema defined in [deploy-app-topology-schema.json](../areas/deploy/src/AzureMcp.Deploy/Schemas/deploy-app-topology-schema.json)
# Generate a mermaid architecture diagram for the application topology follow the schema defined in [DeployAppTopologySchema.cs](./tools/Azure.Mcp.Deploy/src/Schemas/DeployAppTopologySchema.cs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants