Skip to content

Comments

Feature/consolidated tools improvement#1759

Open
shashax42 wants to merge 2 commits intomicrosoft:mainfrom
shashax42:feature/consolidated-tools-improvement
Open

Feature/consolidated tools improvement#1759
shashax42 wants to merge 2 commits intomicrosoft:mainfrom
shashax42:feature/consolidated-tools-improvement

Conversation

@shashax42
Copy link

@shashax42 shashax42 commented Feb 19, 2026

What does this PR do?

Fixes consolidated tool discovery default behavior and aligns unit test command registration with production.

  • Treats ServiceStartOptions.ReadOnly == null as false during command filtering, so the default (unset) behavior does not unintentionally filter down to read-only commands.
  • Updates the unit test CommandFactoryHelpers registration so the same tool areas are registered as in production, preventing gaps in consolidated tool validation coverage.
  • Adds unit tests covering consolidated tool mapping completeness, expected command counts with all areas, and metadata equality edge cases.

Notes for reviewers

  • This is a narrow behavior fix: only the ReadOnly default handling changes (null → false).
  • All unit tests pass locally: dotnet test core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests -c Debug (852 tests).

Relevant links

GitHub issue number?

#1759

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
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
      Not applicable — no product docs/dependency updates, and no tool surface changes beyond correcting the default option interpretation.
  • For MCP tool changes:

    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
      Not applicable — this PR changes consolidated discovery behavior and test infrastructure, not an individual tool implementation.
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
      Not applicable.
    • Validate README.md changes using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
      Not applicable.
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
      Not applicable.
    • Run .\eng\scripts\Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
      Not applicable.
    • 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
      Not applicable.
    • For tools with new names, including new tools or renamed tools, update [consolidated-tools.json](https://github.com/microsoft/mcp/blob/main/core/Microsoft.Mcp.Core/src/Areas/Server/Resources/consolidated-tools.json)
      Not applicable.
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
      Not applicable.
  • Extra steps for Azure MCP Server tool changes:

    • Updated test prompts in /servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
      Not applicable.
    • 👉 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
        Not run — unit-test scoped change. Local unit tests were run (852 tests).

… consolidated tool validation

Add 14 tool area setups that were present in production Program.cs but
missing from the test CommandFactoryHelpers, causing consolidated tool
tests to skip validation for those areas' commands.

Added areas: Advisor, ApplicationInsights, AppService, AzureMigrate,
Communication, Compute, ConfidentialLedger, EventHubs, FileShares,
Policy, Pricing, SignalR, Speech, StorageSync.

Also add new tests for ConsolidatedToolDiscoveryStrategy:
- MapsAllRegisteredCommands: verifies consolidated count equals
  filtered source count (no unmapped commands)
- WithAllAreas_HasSubstantialCommandCount: ensures >200 commands
  are mapped with all areas registered
- AreMetadataEqual unit tests: null handling and value comparison
@github-actions
Copy link

Thank you for your contribution @shashax42! We will review the pull request and get back to you soon.

@shashax42 shashax42 force-pushed the feature/consolidated-tools-improvement branch from 4f9ed60 to 3ad2b73 Compare February 19, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

1 participant