-
Notifications
You must be signed in to change notification settings - Fork 309
Description
Proposal
This is a proposal to reduce the size of the AzureMCP server.
The GenericResource class in the Azure.ResourceManager library supports Create, Update, and Delete operations for any ARM resource type, making it a flexible alternative to using specific Azure.ResourceManager.XXX libraries in individual tools.
Details
Current Approach
Each tool currently relies on its corresponding .NET management library to Create, Update, or Delete Azure resource data. For example, the azmcp_foundry_models_deploy tool uses the Azure.ResourceManager.CognitiveServices library. If we introduce a new tool, such as one to create Starage Disk, we would need to add a dependency on Azure.ResourceManager.Storage.
As more tools are added, the number of Azure management .NET SDKs integrated into the project will grow, leading to a continuous increase in the size of the AzureMCP server.
Proposed Optimization
The GenericResource class in the Azure.ResourceManager library supports Create, Update, and Delete operations for any ARM resource. It can be used to replace the write operations currently handled by individual service-specific libraries. For instance, the azmcp_foundry_models_deploy tool can be refactored to use a GenericResource CreateOrUpdate instead of relying on the CognitiveServices SDK:
var createResult = await armClient.GetGenericResources().CreateOrUpdateAsync(WaitUntil.Completed, id, data);Libraries to be removed
-
Azure.ResourceManager.CognitiveServices: 1.26 MB -
Azure.ResourceManager.LoadTesting: 298 KB -
Azure.ResourceManager.PostgreSql: 1.57 MB -
Azure.ResourceManager.Storage: 1.67 MB -
Azure.ResourceManager.ApplicationInsights: 852 KB
Pros & Cons
✅ Pros
Reduced Server Size: Significantly decreases the overall size of the AzureMCP server by minimizing dependencies.
Extra Input Model Required: No strongly typed models, additional code is needed to define input models.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status