[4.0] Complete Two-Generic Pattern, Sealed Commands, and Native AOT Closure

Open
#3,992 10 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@KarishmaGhiya is already working on this.

Since Oct 19, 2026.

Assessment

This issue has not been assessed yet.

Description

engineering item needs-team-attention server-Azure.Mcp tools-Core

Release Tracker: microsoft/mcp-pr#691 (Theme 3.3)
Initiative: microsoft/mcp#3107 (Maintenance, Support & Platform Health)
Priority: P1 (Committed for 4.0)

Objective

Complete architectural standardization across all Azure MCP toolsets so every command adheres to current C# conventions, two-generic option binding, and full Native AOT compatibility.

Scope

  • Ensure all command classes use primary constructors, are declared sealed, and inherit from the two-generic SubscriptionCommand<TOptions, TResult> (or equivalent two-generic base).
  • Remove remaining legacy OptionDefinitions static classes and RegisterOptions/BindOptions overrides in favor of flat POCO option classes with [Option] attributes.
  • Migrate remaining enum-like string options to typed enums (microsoft/mcp#3131).
  • Complete System.Text.Json source-generation closure across all toolsets by registering all response and option models in JsonSerializerContext.
  • Maintain zero build, trimmer, or AOT warnings under TreatWarningsAsErrors=true.

Related Issues

  • Typed enum option migration: microsoft/mcp#3131

4.0 Exit Criteria

  • Zero legacy RegisterOptions/BindOptions or OptionDefinitions usages remaining in active toolsets.
  • Native AOT build (./eng/scripts/Build-Local.ps1 -IncludeNative -ReleaseBuild) succeeds with zero trimmer or AOT warnings.
  • Formatting, build, and spelling checks (Invoke-Cspell.ps1) pass cleanly across the solution.
Dominant language
C#
Stars
3.9k
Forks
689
Avg merge
2d 11h
Merged PRs (30d)
143

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/mcp

All issues in microsoft/mcp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.