Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a consolidated mode for Azure MCP tools that groups related Azure operations into logical collections, reducing the number of tools presented to LLMs while preserving tool metadata. The mode aggregates individual commands by functionality (e.g., database operations, storage management) into consolidated tools that can execute multiple related operations.
- Adds consolidated tool mode via
--mode consolidatedCLI option - Implements consolidated tool discovery strategy and server providers
- Creates consolidated tools configuration file defining tool groupings and metadata
- Updates metadata handling for tool consolidation
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tools/Azure.Mcp.Tools.Sql/src/Commands/Server/ServerListCommand.cs |
Updates SQL server list command metadata (OpenWorld: true → false) |
tools/Azure.Mcp.Tools.ManagedLustre/src/Commands/FileSystem/FileSystemCreateCommand.cs |
Updates filesystem create command metadata (Destructive: false → true) |
tools/Azure.Mcp.Tools.KeyVault/src/Commands/Admin/AdminSettingsGetCommand.cs |
Updates KeyVault admin settings metadata (OpenWorld: true → false) |
core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategyTests.cs |
Adds unit tests for the new consolidated tool discovery strategy |
core/Azure.Mcp.Core/tests/Azure.Mcp.Core.LiveTests/Areas/Server/ServerCommandTests.cs |
Adds comprehensive integration tests for consolidated mode functionality |
core/Azure.Mcp.Core/src/Commands/CommandGroup.cs |
Adds ToolMetadata property to CommandGroup for metadata preservation |
core/Azure.Mcp.Core/src/Areas/Server/ServerJsonContext.cs |
Adds JSON serialization context for ConsolidatedToolDefinition |
core/Azure.Mcp.Core/src/Areas/Server/Resources/consolidated-tools.json |
Large JSON configuration file defining consolidated tool groupings |
core/Azure.Mcp.Core/src/Areas/Server/Options/ModeTypes.cs |
Adds ConsolidatedProxy mode type constant |
core/Azure.Mcp.Core/src/Areas/Server/Models/ConsolidatedToolDefinition.cs |
Defines model for consolidated tool configuration |
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs |
Adds tool annotation handling for metadata preservation |
core/Azure.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs |
Updates mode validation to include consolidated mode |
core/Azure.Mcp.Core/src/Areas/Server/Commands/ServiceCollectionExtensions.cs |
Adds dependency injection configuration for consolidated mode |
core/Azure.Mcp.Core/src/Areas/Server/Commands/Discovery/McpServerMetadata.cs |
Adds ToolMetadata property to server metadata |
core/Azure.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolServerProvider.cs |
Implements server provider for consolidated tools |
core/Azure.Mcp.Core/src/Areas/Server/Commands/Discovery/ConsolidatedToolDiscoveryStrategy.cs |
Main implementation of consolidated tool discovery logic |
|
Please document how to update the consolicated-tools.json file for new tools. Ideally the documentation should also cover high level strategies such as when to fit the new tool into existing categories and when to recreate categories. |
|
Removing /cc @g2vinay @anuchandy @alzimmermsft -- let's help get this in 1.0 |
* Initial change for adding consolidated mode * Make consolidated mode work end-to-end with all the tools * Fix format * Add all the new commands * Merged a couple consolidated tools * Add ToolDescriptionEvaluator result * Add instructions on how to add new tool to consolidated mode * Add one more tool to consolidated mode and fixed test failures * Add documentation * Honor --read-only server setting * Honor --namespace server setting * Update doc * Update test * Update test * Address review feedbacks * Fix ToolMetadata values
Update CHANGELOG
What does this PR do?
Add consolidated mode, which group Azure MCP tools by tasks and actions tools conduct. This reduces the number of tools being presented to LLM, while preserves ToolMetadata values. The definition of the consolidated tools and individual commands being mapped to each tool is defined in
core/Azure.Mcp.Core/src/Areas/Server/Resources/consolidated-tools.jsonIt honors both
--read-onlyand--namespaceswitches.Note that tools being added from external MCP servers are considered for grouping, as there is no way to get their toolMetadata. They will be loaded the same as namespace mode.
Validation:
Test result from ToolDescriptionEvaluator: Acceptable confidence (≥0.4): 87.0%
Telemetry
For consolidated mode, these are the values to be captured in telemetry event:
To-Do:
GitHub issue number?
N/A
Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.mdand/orservers/Fabric.Mcp.Server/CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies)servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationeng/scripts/Process-PackageReadMe.ps1. See Package README/servers/Azure.Mcp.Server/docs/azmcp-commands.mdand/or/docs/fabric-commands.mdToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test prompts/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline