You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #2852 refactored AksService to use BaseAzureResourceService (Azure Resource Graph queries) instead of direct ARM API calls. As part of this change:
The validation that required --resource-group when --cluster was specified was removed from ClusterGetCommand.cs
The ValidateRequiredParameters call in the single-cluster path was updated to only require clusterName (not resourceGroup)
ClusterGetOptions.ResourceGroup is string? — it has always been optional at the options level, but the validation and service logic now fully honors this optionality
The cluster can now be looked up by name across all resource groups in a subscription without needing --resource-group.
Gaps Found
azmcp-commands.md AKS cluster get command signature shows --resource-group as a required parameter (no brackets), but it is now optional:
# Current (incorrect):
azmcp aks cluster get --subscription <subscription> \
--resource-group <resource-group> \
[--cluster <cluster>]
# Correct (after PR #2852):
azmcp aks cluster get --subscription <subscription> \
[--resource-group <resource-group>] \
[--cluster <cluster>]
Files to Update
servers/Azure.Mcp.Server/docs/azmcp-commands.md
Context
Removed validation from ClusterGetCommand.cs (PR #2852 diff):
- if (!string.IsNullOrEmpty(options.Cluster) && string.IsNullOrEmpty(options.ResourceGroup))- {- validationResult.Errors.Add("When specifying a cluster name, the --resource-group option is required.");- }
Updated ValidateRequiredParameters in AksService.cs (PR #2852 diff):
Note: Related open issue #2921 (filed before PR #2852 merged) incorrectly states in its implementation guide that "The AKS command signatures remain accurate." That issue covers --auth-method exclusion and does not address the --resource-group optionality gap introduced by PR #2852.
📐 Implementation Guide
This section contains step-by-step instructions for a coding agent to implement the changes described above.
The azmcp aks cluster get signature shows [--resource-group <resource-group>] (with brackets, indicating optional)
The azmcp aks nodepool get signature is unchanged (it still requires --resource-group and --cluster)
No other AKS-related changes are needed
Step 3: Validate
Run these commands in order. Each must succeed before proceeding to the next:
dotnet build servers/Azure.Mcp.Server/ — confirms the server project compiles cleanly
dotnet build tools/Azure.Mcp.Tools.Aks/src/ — confirms the AKS toolset compiles
dotnet test tools/Azure.Mcp.Tools.Aks/tests/Azure.Mcp.Tools.Aks.Tests/ --filter "TestType!=Live" — runs unit tests for the AKS toolset
.\eng\common\spelling\Invoke-Cspell.ps1 — checks spelling in modified documentation
Next Steps
Tip
Ready for automated implementation? Assign this issue to @copilot to have Copilot coding agent implement the changes described in the Implementation Guide above
Documentation Gap
Server:
Azure.Mcp.ServerTool directory:
tools/Azure.Mcp.Tools.AksTriggered by: commit 09c3a3f2b2 / PR #2852 by
@msalamanChanged files:
tools/Azure.Mcp.Tools.Aks/src/Commands/Cluster/ClusterGetCommand.cstools/Azure.Mcp.Tools.Aks/src/Services/AksService.cstools/Azure.Mcp.Tools.Aks/src/Options/Cluster/ClusterGetOptions.csWhat Changed
PR #2852 refactored
AksServiceto useBaseAzureResourceService(Azure Resource Graph queries) instead of direct ARM API calls. As part of this change:--resource-groupwhen--clusterwas specified was removed fromClusterGetCommand.csValidateRequiredParameterscall in the single-cluster path was updated to only requireclusterName(notresourceGroup)ClusterGetOptions.ResourceGroupisstring?— it has always been optional at the options level, but the validation and service logic now fully honors this optionalityThe cluster can now be looked up by name across all resource groups in a subscription without needing
--resource-group.Gaps Found
azmcp-commands.mdAKS cluster get command signature shows--resource-groupas a required parameter (no brackets), but it is now optional:Files to Update
servers/Azure.Mcp.Server/docs/azmcp-commands.mdContext
Removed validation from
ClusterGetCommand.cs(PR #2852 diff):Updated
ValidateRequiredParametersinAksService.cs(PR #2852 diff):ClusterGetOptions.csconfirmsResourceGroupis optional:📐 Implementation Guide
This section contains step-by-step instructions for a coding agent to implement the changes described above.
Step 1: Modify files
File:
servers/Azure.Mcp.Server/docs/azmcp-commands.mdLocate the Azure Kubernetes Service (AKS) Operations section. Find this block:
Replace it with:
The only change is wrapping
--resource-group <resource-group>in square brackets to indicate it is optional.Step 2: Verify documentation structure
servers/Azure.Mcp.Server/docs/azmcp-commands.md— confirm:azmcp aks cluster getsignature shows[--resource-group <resource-group>](with brackets, indicating optional)azmcp aks nodepool getsignature is unchanged (it still requires--resource-groupand--cluster)Step 3: Validate
Run these commands in order. Each must succeed before proceeding to the next:
dotnet build servers/Azure.Mcp.Server/— confirms the server project compiles cleanlydotnet build tools/Azure.Mcp.Tools.Aks/src/— confirms the AKS toolset compilesdotnet test tools/Azure.Mcp.Tools.Aks/tests/Azure.Mcp.Tools.Aks.Tests/ --filter "TestType!=Live"— runs unit tests for the AKS toolset.\eng\common\spelling\Invoke-Cspell.ps1— checks spelling in modified documentationNext Steps
Tip
Ready for automated implementation? Assign this issue to
@copilotto have Copilot coding agent implement the changes described in the Implementation Guide above