diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e4238e37ef..100878191f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -147,7 +147,7 @@ # ServiceOwners: @smritiy @srnagar @jongio @zaaslam # PRLabel: %tools-ManagedLustre -/tools/Azure.Mcp.Tools.ManagedLustre/ @wolfgang-desalvador @microsoft/azure-mcp +/tools/Azure.Mcp.Tools.ManagedLustre/ @wolfgang-desalvador @microsoft/azure-mcp # ServiceLabel: %tools-ManagedLustre # ServiceOwners: @wolfgang-desalvador @@ -245,3 +245,9 @@ # ServiceLabel: %tools-ConfidentialLedger # ServiceOwners: @taicchoumsft @ivarprudnikov + +# PRLabel: %tools-ResourceHealth +/tools/Azure.Mcp.Tools.ResourceHealth/ @pkaza-msft @microsoft/azure-mcp + +# ServiceLabel: %tools-ResourceHealth +# ServiceOwners: @pkaza-msft @microsoft/azure-mcp diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 95183401bb..e88547a205 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -418,7 +418,6 @@ "functionapp", "functionapps", "germanynorth", - "gethealth", "grpcio", "gsaascend", "gsamas", diff --git a/eng/scripts/Analyze-Code.ps1 b/eng/scripts/Analyze-Code.ps1 index b2d013a692..2d01dbd572 100644 --- a/eng/scripts/Analyze-Code.ps1 +++ b/eng/scripts/Analyze-Code.ps1 @@ -42,6 +42,18 @@ try { Write-Host "✅ Tool description evaluation did not detect any issues." } + # Run tool name length validation + $toolNameResult = & "$PSScriptRoot/Test-ToolNameLength.ps1" + + if ($LASTEXITCODE -ne 0) { + Write-Host "❌ Tool name length validation failed" + Write-Host "Maximum Length Allowed: $($toolNameResult.MaxAllowed). $($toolNameResult.ViolationCount) tool(s) exceeding this limit. Review the above output for details." + $hasErrors = $true + } else { + Write-Host "✅ Tool name length validation passed." + Write-Host "All tools are within the $($toolNameResult.MaxAllowed) character limit." + } + if($hasErrors) { exit 1 } diff --git a/eng/scripts/Test-ToolNameLength.ps1 b/eng/scripts/Test-ToolNameLength.ps1 new file mode 100644 index 0000000000..9e73783a58 --- /dev/null +++ b/eng/scripts/Test-ToolNameLength.ps1 @@ -0,0 +1,234 @@ +#!/usr/bin/env pwsh +#Requires -Version 7 + +<# +.SYNOPSIS + Validates that all tool names don't exceed the maximum length + +.DESCRIPTION + This script validates that tool name length doesn't exceed 48 characters. + + Tool name format: {area}_{resource}_{operation} + Example: "managedlustre_filesystem_subnetsize_validate-length" = 50 chars (EXCEEDS) + The limit does NOT include the MCP server prefix (e.g., "AzureMCP-AllTools-"). + +.PARAMETER MaxLength + Maximum allowed length for tool names (default: 48) + +.PARAMETER ServerName + Name of the server to test. If not specified, all servers will be tested. +#> + +param( + [int]$MaxLength = 48, + [string]$ServerName +) + +$ErrorActionPreference = 'Stop' + +. "$PSScriptRoot/../common/scripts/common.ps1" +$RepoRoot = $RepoRoot.Path.Replace('\', '/') + +if ($ServerName) { + Write-Host "Validating tool name length for $ServerName" +} else { + Write-Host "Validating tool name length for all servers" +} +Write-Host "Max length: $MaxLength characters" +Write-Host "" + +# Use the build infrastructure - New-BuildInfo.ps1 and Build-Code.ps1 +$buildInfoPath = "$RepoRoot/.work/build_info.json" +$buildOutputPath = "$RepoRoot/.work/build" + +# Clean up previous build artifacts +Remove-Item -Path $buildOutputPath -Recurse -Force -ErrorAction SilentlyContinue -ProgressAction SilentlyContinue + +# Create build metadata +& "$RepoRoot/eng/scripts/New-BuildInfo.ps1" ` + -ServerName $ServerName ` + -PublishTarget none ` + -BuildId 12345 + +if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to create build info" + exit 1 +} + +# Build the server +& "$RepoRoot/eng/scripts/Build-Code.ps1" + +if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to build $ServerName" + exit 1 +} + +# Read build_info.json to get server information +$buildInfo = Get-Content $buildInfoPath -Raw | ConvertFrom-Json -AsHashtable + +# Get servers to test +$serversToTest = $buildInfo.servers +if (-not $serversToTest -or $serversToTest.Count -eq 0) { + Write-Error "No servers found in build_info.json" + exit 1 +} + +Write-Host "Testing $($serversToTest.Count) server(s)" +Write-Host "" + +# Track overall results +$overallViolations = @() +$overallSuccess = $true +$testedServers = 0 +$skippedServers = 0 + +foreach ($serverInfo in $serversToTest) { + $currentServerName = $serverInfo.name + Write-Host "==================================================" + Write-Host "Testing: $currentServerName" + Write-Host "==================================================" + + # Get the executable name and find the built platform + $executableName = $serverInfo.cliName + $(if ($IsWindows) { ".exe" } else { "" }) + + # Find the first platform that was actually built + $builtPlatform = $serverInfo.platforms | Where-Object { + Test-Path "$buildOutputPath/$($_.artifactPath)" + } | Select-Object -First 1 + + if (-not $builtPlatform) { + Write-Warning "No built platform found for $currentServerName - skipping" + $skippedServers++ + Write-Host "" + continue + } + + $executablePath = "$buildOutputPath/$($builtPlatform.artifactPath)/$executableName" + + if (-not (Test-Path $executablePath)) { + Write-Error "Executable not found at $executablePath for $currentServerName" + exit 1 + } + + # Try to get tools - some servers may not support 'tools list' + Write-Host "Loading tools from $currentServerName" + try { + $toolsJson = & $executablePath tools list 2>&1 | Out-String + + if ($LASTEXITCODE -ne 0) { + Write-Warning "$currentServerName 'tools list' command failed with exit code $LASTEXITCODE (may have no tools) - skipping" + $skippedServers++ + Write-Host "" + continue + } + + if ([string]::IsNullOrWhiteSpace($toolsJson)) { + Write-Warning "No output received from '$currentServerName tools list' - skipping" + $skippedServers++ + Write-Host "" + continue + } + + $toolsResult = $toolsJson | ConvertFrom-Json + $tools = $toolsResult.results + + if ($null -eq $tools -or $tools.Count -eq 0) { + Write-Warning "No tools found in $currentServerName - skipping" + $skippedServers++ + Write-Host "" + continue + } + + Write-Host "Loaded $($tools.Count) tools" + $testedServers++ + + # Validate tool name lengths + $violations = @() + $maxToolNameLength = 0 + + foreach ($tool in $tools) { + $toolName = $tool.command -replace ' ', '_' + $fullLength = $toolName.Length + + if ($fullLength -gt $maxToolNameLength) { + $maxToolNameLength = $fullLength + } + + if ($fullLength -gt $MaxLength) { + $violations += [PSCustomObject]@{ + Server = $currentServerName + ToolName = $toolName + Command = $tool.command + Length = $fullLength + Excess = $fullLength - $MaxLength + } + } + } + + Write-Host "Longest tool name: $maxToolNameLength characters" + + if ($violations.Count -eq 0) { + Write-Host "All $($tools.Count) tool names are within the $MaxLength character limit!" -ForegroundColor Green + } + else { + Write-Host "Found $($violations.Count) violation(s):" -ForegroundColor Red + $violations | ForEach-Object { + Write-Host " - $($_.ToolName) ($($_.Length) chars, exceeds by $($_.Excess))" -ForegroundColor Red + } + $overallViolations += $violations + $overallSuccess = $false + } + } + catch { + Write-Warning "Error testing $currentServerName : $_" + Write-Host "This server may not support tool validation - skipping" + $skippedServers++ + } + + Write-Host "" +} + +# Final summary +Write-Host "==================================================" +Write-Host "SUMMARY" +Write-Host "==================================================" +Write-Host "Servers tested: $testedServers" +Write-Host "Servers skipped: $skippedServers" +Write-Host "Total violations: $($overallViolations.Count)" +Write-Host "" + +if ($overallViolations.Count -gt 0) { + Write-Host "VIOLATIONS FOUND:" -ForegroundColor Red + Write-Host "" + + $overallViolations | Sort-Object -Property Length -Descending | ForEach-Object { + Write-Host " Server: $($_.Server)" + Write-Host " Tool: $($_.ToolName)" + Write-Host " Command: $($_.Command)" + Write-Host " Length: $($_.Length) characters (exceeds by $($_.Excess))" + Write-Host "" + } +} + +# Prepare return object +$result = [PSCustomObject]@{ + MaxAllowed = $MaxLength + ServersTested = $testedServers + ServersSkipped = $skippedServers + ViolationCount = $overallViolations.Count +} + +$result + +if ($overallSuccess -and $testedServers -gt 0) { + Write-Host "All tested servers passed validation!" -ForegroundColor Green + exit 0 +} +elseif ($testedServers -eq 0) { + Write-Error "No servers were successfully tested. All $($skippedServers) server(s) were skipped." + exit 1 +} +else { + Write-Host "Validation failed - see violations above" -ForegroundColor Red + exit 1 +} \ No newline at end of file diff --git a/eng/tools/ToolDescriptionEvaluator/prompts.json b/eng/tools/ToolDescriptionEvaluator/prompts.json index 70884a2a9a..62d12fe1aa 100644 --- a/eng/tools/ToolDescriptionEvaluator/prompts.json +++ b/eng/tools/ToolDescriptionEvaluator/prompts.json @@ -774,10 +774,10 @@ "azmcp_virtualdesktop_hostpool_list": [ "List all host pools in my subscription" ], - "azmcp_virtualdesktop_hostpool_sessionhost_list": [ + "azmcp_virtualdesktop_hostpool_session_list": [ "List all session hosts in host pool " ], - "azmcp_virtualdesktop_hostpool_sessionhost_usersession-list": [ + "azmcp_virtualdesktop_hostpool_session_user_list": [ "List all user sessions on session host in host pool " ], "azmcp_workbooks_create": [ diff --git a/servers/Azure.Mcp.Server/CHANGELOG.md b/servers/Azure.Mcp.Server/CHANGELOG.md index 4e726db795..822a8f6c6e 100644 --- a/servers/Azure.Mcp.Server/CHANGELOG.md +++ b/servers/Azure.Mcp.Server/CHANGELOG.md @@ -13,6 +13,7 @@ The Azure MCP Server updates automatically by default whenever a new release com ### Other Changes - Updated how `IsServerCommandInvoked` telemetry is captured to more correctly report whether learning or tool call was performed. [[#874](https://github.com/microsoft/mcp/pull/874)] +- Added tool name length validation to ensure all tool names stay within 48 character limit for compatibility with MCP clients. [[#881](https://github.com/microsoft/mcp/pull/881)] ## 0.9.4 (2025-10-17) diff --git a/servers/Azure.Mcp.Server/docs/azmcp-commands.md b/servers/Azure.Mcp.Server/docs/azmcp-commands.md index 286e4ec2fe..7869c59aaa 100644 --- a/servers/Azure.Mcp.Server/docs/azmcp-commands.md +++ b/servers/Azure.Mcp.Server/docs/azmcp-commands.md @@ -1386,7 +1386,7 @@ azmcp monitor workspace log query --subscription \ ```bash # Get the health of an entity # ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired -azmcp monitor healthmodels entity gethealth --subscription \ +azmcp monitor healthmodels entity get --subscription \ --resource-group \ --health-model \ --entity @@ -1516,12 +1516,12 @@ azmcp monitor webtests update --subscription \ ```bash # List Azure Managed Lustre Filesystems available in a subscription or resource group # ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired -azmcp managedlustre filesystem list --subscription \ +azmcp managedlustre fs list --subscription \ --resource-group # Create an Azure Managed Lustre filesystem # ❌ Destructive | ❌ Idempotent | ❌ OpenWorld | ❌ ReadOnly | ❌ Secret | ❌ LocalRequired -azmcp managedlustre filesystem create --subscription \ +azmcp managedlustre fs create --subscription \ --sku \ --size \ --subnet-id \ @@ -1542,7 +1542,7 @@ azmcp managedlustre filesystem create --subscription \ # Update an existing Azure Managed Lustre filesystem # ✅ Destructive | ✅ Idempotent | ❌ OpenWorld | ❌ ReadOnly | ❌ Secret | ❌ LocalRequired -azmcp managedlustre filesystem update --subscription \ +azmcp managedlustre fs update --subscription \ --resource-group \ --name \ [--maintenance-day ] \ @@ -1554,13 +1554,13 @@ azmcp managedlustre filesystem update --subscription \ # Returns the required number of IP addresses for a specific Azure Managed Lustre SKU and filesystem size # ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired -azmcp managedlustre filesystem subnetsize ask --subscription \ +azmcp managedlustre fs subnetsize ask --subscription \ --sku \ --size # Checks if a subnet has enough available IP addresses for the specified Azure Managed Lustre SKU and filesystem size # ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired -azmcp managedlustre filesystem subnetsize validate --subscription \ +azmcp managedlustre fs subnetsize validate --subscription \ --subnet-id \ --sku \ --size \ @@ -1568,7 +1568,7 @@ azmcp managedlustre filesystem subnetsize validate --subscription # Lists the available Azure Managed Lustre SKUs in a specific location # ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired -azmcp managedlustre filesystem sku get --subscription \ +azmcp managedlustre fs sku get --subscription \ --location ``` @@ -1652,7 +1652,7 @@ azmcp resourcehealth availability-status list --subscription \ # List service health events in a subscription # ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired -azmcp resourcehealth service-health-events list --subscription \ +azmcp resourcehealth health-events list --subscription \ [--event-type ] \ [--status ] \ [--query-start-time ] \ @@ -1905,13 +1905,13 @@ azmcp virtualdesktop hostpool list --subscription \ # List session hosts in a host pool # ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired -azmcp virtualdesktop hostpool sessionhost list --subscription \ +azmcp virtualdesktop hostpool host list --subscription \ [--hostpool | --hostpool-resource-id ] \ [--resource-group ] # List user sessions on a session host # ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired -azmcp virtualdesktop hostpool sessionhost usersession-list --subscription \ +azmcp virtualdesktop hostpool host user-list --subscription \ [--hostpool | --hostpool-resource-id ] \ --sessionhost \ [--resource-group ] @@ -1942,18 +1942,18 @@ azmcp virtualdesktop hostpool list --subscription \ ```bash # Standard usage - enumerates all host pools in subscription # ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired -azmcp virtualdesktop hostpool sessionhost list --subscription \ +azmcp virtualdesktop hostpool host list --subscription \ --hostpool # Optimized usage - direct resource group access # ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired -azmcp virtualdesktop hostpool sessionhost list --subscription \ +azmcp virtualdesktop hostpool host list --subscription \ --hostpool \ --resource-group # Alternative with resource ID (no resource group needed) # ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired -azmcp virtualdesktop hostpool sessionhost list --subscription \ +azmcp virtualdesktop hostpool host list --subscription \ --hostpool-resource-id /subscriptions//resourceGroups//providers/Microsoft.DesktopVirtualization/hostPools/ ``` diff --git a/servers/Azure.Mcp.Server/docs/e2eTestPrompts.md b/servers/Azure.Mcp.Server/docs/e2eTestPrompts.md index 209b718ab9..b1f935bbbe 100644 --- a/servers/Azure.Mcp.Server/docs/e2eTestPrompts.md +++ b/servers/Azure.Mcp.Server/docs/e2eTestPrompts.md @@ -413,13 +413,13 @@ This file contains prompts used for end-to-end testing to ensure each tool is in | Tool Name | Test Prompt | |:----------|:----------| -| azmcp_managedlustre_filesystem_create | Create an Azure Managed Lustre filesystem with name , size , SKU , and subnet for availability zone in location . Maintenance should occur on at | -| azmcp_managedlustre_filesystem_list | List the Azure Managed Lustre filesystems in my subscription | -| azmcp_managedlustre_filesystem_list | List the Azure Managed Lustre filesystems in my resource group | -| azmcp_managedlustre_filesystem_sku_get | List the Azure Managed Lustre SKUs available in location | -| azmcp_managedlustre_filesystem_subnetsize_ask | Tell me how many IP addresses I need for an Azure Managed Lustre filesystem of size using the SKU | -| azmcp_managedlustre_filesystem_subnetsize_validate | Validate if the network can host Azure Managed Lustre filesystem of size using the SKU | -| azmcp_managedlustre_filesystem_update | Update the maintenance window of the Azure Managed Lustre filesystem to at | +| azmcp_managedlustre_fs_create | Create an Azure Managed Lustre filesystem with name , size , SKU , and subnet for availability zone in location . Maintenance should occur on at | +| azmcp_managedlustre_fs_list | List the Azure Managed Lustre filesystems in my subscription | +| azmcp_managedlustre_fs_list | List the Azure Managed Lustre filesystems in my resource group | +| azmcp_managedlustre_fs_sku_get | List the Azure Managed Lustre SKUs available in location | +| azmcp_managedlustre_fs_subnetsize_ask | Tell me how many IP addresses I need for an Azure Managed Lustre filesystem of size using the SKU | +| azmcp_managedlustre_fs_subnetsize_validate | Validate if the network can host Azure Managed Lustre filesystem of size using the SKU | +| azmcp_managedlustre_fs_update | Update the maintenance window of the Azure Managed Lustre filesystem to at | ## Azure Marketplace @@ -447,7 +447,7 @@ This file contains prompts used for end-to-end testing to ensure each tool is in | Tool Name | Test Prompt | |:----------|:----------| | azmcp_monitor_activitylog_list | List the activity logs of the last month for | -| azmcp_monitor_healthmodels_entity_gethealth | Show me the health status of entity using the health model | +| azmcp_monitor_healthmodels_entity_get | Show me the health status of entity using the health model | | azmcp_monitor_metrics_definitions | Get metric definitions for from the namespace | | azmcp_monitor_metrics_definitions | Show me all available metrics and their definitions for storage account | | azmcp_monitor_metrics_definitions | What metric definitions are available for the Application Insights resource | @@ -529,11 +529,11 @@ This file contains prompts used for end-to-end testing to ensure each tool is in | azmcp_resourcehealth_availability-status_list | List availability status for all resources in my subscription | | azmcp_resourcehealth_availability-status_list | Show me the health status of all my Azure resources | | azmcp_resourcehealth_availability-status_list | What resources in resource group have health issues? | -| azmcp_resourcehealth_service-health-events_list | List all service health events in my subscription | -| azmcp_resourcehealth_service-health-events_list | Show me Azure service health events for subscription | -| azmcp_resourcehealth_service-health-events_list | What service issues have occurred in the last 30 days? | -| azmcp_resourcehealth_service-health-events_list | List active service health events in my subscription | -| azmcp_resourcehealth_service-health-events_list | Show me planned maintenance events for my Azure services | +| azmcp_resourcehealth_health-events_list | List all service health events in my subscription | +| azmcp_resourcehealth_health-events_list | Show me Azure service health events for subscription | +| azmcp_resourcehealth_health-events_list | What service issues have occurred in the last 30 days? | +| azmcp_resourcehealth_health-events_list | List active service health events in my subscription | +| azmcp_resourcehealth_health-events_list | Show me planned maintenance events for my Azure services | ## Azure Service Bus @@ -654,8 +654,8 @@ This file contains prompts used for end-to-end testing to ensure each tool is in | Tool Name | Test Prompt | |:----------|:----------| | azmcp_virtualdesktop_hostpool_list | List all host pools in my subscription | -| azmcp_virtualdesktop_hostpool_sessionhost_list | List all session hosts in host pool | -| azmcp_virtualdesktop_hostpool_sessionhost_usersession-list | List all user sessions on session host in host pool | +| azmcp_virtualdesktop_hostpool_host_list | List all session hosts in host pool | +| azmcp_virtualdesktop_hostpool_host_user-list | List all user sessions on session host in host pool | ## Azure Workbooks diff --git a/tools/Azure.Mcp.Tools.ManagedLustre/src/ManagedLustreSetup.cs b/tools/Azure.Mcp.Tools.ManagedLustre/src/ManagedLustreSetup.cs index 2a33dca86d..9e54a6220a 100644 --- a/tools/Azure.Mcp.Tools.ManagedLustre/src/ManagedLustreSetup.cs +++ b/tools/Azure.Mcp.Tools.ManagedLustre/src/ManagedLustreSetup.cs @@ -30,7 +30,7 @@ public CommandGroup RegisterCommands(IServiceProvider serviceProvider) var managedLustre = new CommandGroup(Name, "Azure Managed Lustre operations - Commands for creating, updating, listing and inspecting Azure Managed Lustre file systems (AMLFS) used for high-performance computing workloads. The tool focuses on managing all the aspects related to Azure Managed Lustre file system instances."); - var fileSystem = new CommandGroup("filesystem", "Azure Managed Lustre file system operations - Commands for listing managed Lustre file systems."); + var fileSystem = new CommandGroup("fs", "Azure Managed Lustre file system operations - Commands for listing managed Lustre file systems."); managedLustre.AddSubGroup(fileSystem); var list = serviceProvider.GetRequiredService(); diff --git a/tools/Azure.Mcp.Tools.ManagedLustre/tests/Azure.Mcp.Tools.ManagedLustre.LiveTests/ManagedLustreCommandTests.cs b/tools/Azure.Mcp.Tools.ManagedLustre/tests/Azure.Mcp.Tools.ManagedLustre.LiveTests/ManagedLustreCommandTests.cs index 112ec3bf10..2dd0944b34 100644 --- a/tools/Azure.Mcp.Tools.ManagedLustre/tests/Azure.Mcp.Tools.ManagedLustre.LiveTests/ManagedLustreCommandTests.cs +++ b/tools/Azure.Mcp.Tools.ManagedLustre/tests/Azure.Mcp.Tools.ManagedLustre.LiveTests/ManagedLustreCommandTests.cs @@ -14,7 +14,7 @@ public class ManagedLustreCommandTests(ITestOutputHelper output) : CommandTestsB public async Task Should_list_filesystems_by_subscription() { var result = await CallToolAsync( - "managedlustre_filesystem_list", + "managedlustre_fs_list", new() { { "subscription", Settings.SubscriptionId } @@ -45,7 +45,7 @@ public async Task Should_list_filesystems_by_subscription() public async Task Should_calculate_required_subnet_size() { var result = await CallToolAsync( - "managedlustre_filesystem_subnetsize_ask", + "managedlustre_fs_subnetsize_ask", new() { { "subscription", Settings.SubscriptionId }, @@ -62,7 +62,7 @@ public async Task Should_calculate_required_subnet_size() public async Task Should_get_sku_info() { var result = await CallToolAsync( - "managedlustre_filesystem_sku_get", + "managedlustre_fs_sku_get", new() { { "subscription", Settings.SubscriptionId } @@ -76,7 +76,7 @@ public async Task Should_get_sku_info() public async Task Should_get_sku_info_zonal_support() { var result = await CallToolAsync( - "managedlustre_filesystem_sku_get", + "managedlustre_fs_sku_get", new() { { "subscription", Settings.SubscriptionId }, @@ -95,7 +95,7 @@ public async Task Should_get_sku_info_zonal_support() public async Task Should_get_sku_info_no_zonal_support() { var result = await CallToolAsync( - "managedlustre_filesystem_sku_get", + "managedlustre_fs_sku_get", new() { { "subscription", Settings.SubscriptionId }, @@ -129,7 +129,7 @@ public async Task Should_create_azure_managed_lustre_no_blob_no_cmk() var hsmLogContainerId = Environment.GetEnvironmentVariable("HSM_LOGS_CONTAINER_ID"); var result = await CallToolAsync( - "managedlustre_filesystem_create", + "managedlustre_fs_create", new() { { "subscription", Settings.SubscriptionId }, @@ -173,7 +173,7 @@ public async Task Should_update_maintenance_and_verify_with_list() { // Update maintenance window for existing filesystem var updateResult = await CallToolAsync( - "managedlustre_filesystem_update", + "managedlustre_fs_update", new() { { "subscription", Settings.SubscriptionId }, @@ -188,7 +188,7 @@ public async Task Should_update_maintenance_and_verify_with_list() // Verify via list var listResult = await CallToolAsync( - "managedlustre_filesystem_list", + "managedlustre_fs_list", new() { { "subscription", Settings.SubscriptionId } @@ -226,7 +226,7 @@ public async Task Should_update_maintenance_and_verify_with_list() public async Task Should_check_subnet_size_and_succeed() { var result = await CallToolAsync( - "managedlustre_filesystem_subnetsize_validate", + "managedlustre_fs_subnetsize_validate", new() { { "subscription", Settings.SubscriptionId }, @@ -245,7 +245,7 @@ public async Task Should_check_subnet_size_and_succeed() public async Task Should_check_subnet_size_and_fail() { var result = await CallToolAsync( - "managedlustre_filesystem_subnetsize_validate", + "managedlustre_fs_subnetsize_validate", new() { { "subscription", Settings.SubscriptionId }, @@ -265,7 +265,7 @@ public async Task Should_update_root_squash_and_verify_with_list() { // Update root squash settings for existing filesystem var updateResult = await CallToolAsync( - "managedlustre_filesystem_update", + "managedlustre_fs_update", new() { { "subscription", Settings.SubscriptionId }, @@ -293,7 +293,7 @@ public async Task Should_update_root_squash_and_verify_with_list() // Verify via list var listResult = await CallToolAsync( - "managedlustre_filesystem_list", + "managedlustre_fs_list", new() { { "subscription", Settings.SubscriptionId } diff --git a/tools/Azure.Mcp.Tools.Monitor/src/Commands/HealthModels/Entity/EntityGetHealthCommand.cs b/tools/Azure.Mcp.Tools.Monitor/src/Commands/HealthModels/Entity/EntityGetHealthCommand.cs index 04e993f25f..28e712f89f 100644 --- a/tools/Azure.Mcp.Tools.Monitor/src/Commands/HealthModels/Entity/EntityGetHealthCommand.cs +++ b/tools/Azure.Mcp.Tools.Monitor/src/Commands/HealthModels/Entity/EntityGetHealthCommand.cs @@ -12,7 +12,7 @@ namespace Azure.Mcp.Tools.Monitor.Commands.HealthModels.Entity; public sealed class EntityGetHealthCommand(ILogger logger) : BaseMonitorHealthModelsCommand { private const string CommandTitle = "Get the health of an entity in a health model"; - private const string CommandName = "gethealth"; + private const string CommandName = "get"; public override string Name => CommandName; public override string Description => $""" diff --git a/tools/Azure.Mcp.Tools.ResourceHealth/src/Commands/AvailabilityStatus/AvailabilityStatusGetCommand.cs b/tools/Azure.Mcp.Tools.ResourceHealth/src/Commands/AvailabilityStatus/AvailabilityStatusGetCommand.cs index 12bc584a0f..829d0dfa7e 100644 --- a/tools/Azure.Mcp.Tools.ResourceHealth/src/Commands/AvailabilityStatus/AvailabilityStatusGetCommand.cs +++ b/tools/Azure.Mcp.Tools.ResourceHealth/src/Commands/AvailabilityStatus/AvailabilityStatusGetCommand.cs @@ -23,7 +23,7 @@ public sealed class AvailabilityStatusGetCommand(ILogger $""" Get the current availability status or health status of a specific Azure resource to diagnose health issues. Works with storage_account_name, virtual machine, resource group, subscription, and other Azure types. It provides detailed information about resource availability state, potential issues, and timestamps. - If health model is provided, don't use this command, instead use monitor_healthmodels_entity_gethealth tool. + If health model is provided, don't use this command, instead use monitor_healthmodels_entity_get tool. """; public override string Title => CommandTitle; diff --git a/tools/Azure.Mcp.Tools.ResourceHealth/src/ResourceHealthSetup.cs b/tools/Azure.Mcp.Tools.ResourceHealth/src/ResourceHealthSetup.cs index 17db2e8a7c..e73997066d 100644 --- a/tools/Azure.Mcp.Tools.ResourceHealth/src/ResourceHealthSetup.cs +++ b/tools/Azure.Mcp.Tools.ResourceHealth/src/ResourceHealthSetup.cs @@ -39,8 +39,8 @@ Use this tool to check the current availability status of Azure resources and id "Resource availability status operations - Commands for retrieving current and historical availability status of Azure resources."); resourceHealth.AddSubGroup(availabilityStatus); - // Create service-health-events subgroup - var serviceHealthEvents = new CommandGroup("service-health-events", + // Create health-events subgroup + var serviceHealthEvents = new CommandGroup("health-events", "Service health events operations - Commands for retrieving Azure service health events affecting Azure services and subscriptions."); resourceHealth.AddSubGroup(serviceHealthEvents); diff --git a/tools/Azure.Mcp.Tools.VirtualDesktop/src/Commands/SessionHost/SessionHostUserSessionListCommand.cs b/tools/Azure.Mcp.Tools.VirtualDesktop/src/Commands/SessionHost/SessionHostUserSessionListCommand.cs index 5daeab18ee..7ddeaddf85 100644 --- a/tools/Azure.Mcp.Tools.VirtualDesktop/src/Commands/SessionHost/SessionHostUserSessionListCommand.cs +++ b/tools/Azure.Mcp.Tools.VirtualDesktop/src/Commands/SessionHost/SessionHostUserSessionListCommand.cs @@ -15,7 +15,7 @@ public sealed class SessionHostUserSessionListCommand(ILogger _logger = logger; - public override string Name => "usersession-list"; + public override string Name => "user-list"; public override string Description => """ diff --git a/tools/Azure.Mcp.Tools.VirtualDesktop/src/VirtualDesktopSetup.cs b/tools/Azure.Mcp.Tools.VirtualDesktop/src/VirtualDesktopSetup.cs index d5b2606439..89141428c6 100644 --- a/tools/Azure.Mcp.Tools.VirtualDesktop/src/VirtualDesktopSetup.cs +++ b/tools/Azure.Mcp.Tools.VirtualDesktop/src/VirtualDesktopSetup.cs @@ -31,7 +31,7 @@ public CommandGroup RegisterCommands(IServiceProvider serviceProvider) var hostpool = new CommandGroup("hostpool", "Hostpool operations - Commands for listing and managing Hostpools, including listing and changing settings on hostpools."); desktop.AddSubGroup(hostpool); - var sessionhost = new CommandGroup("sessionhost", "Sessionhost operations - Commands for listing and managing session hosts inside a host pool."); + var sessionhost = new CommandGroup("host", "Sessionhost operations - Commands for listing and managing session hosts inside a host pool."); hostpool.AddSubGroup(sessionhost); // Register AVD commands diff --git a/tools/Azure.Mcp.Tools.VirtualDesktop/tests/Azure.Mcp.Tools.VirtualDesktop.LiveTests/VirtualDesktopCommandTests.cs b/tools/Azure.Mcp.Tools.VirtualDesktop/tests/Azure.Mcp.Tools.VirtualDesktop.LiveTests/VirtualDesktopCommandTests.cs index 0502ef1833..b51e6d3d6e 100644 --- a/tools/Azure.Mcp.Tools.VirtualDesktop/tests/Azure.Mcp.Tools.VirtualDesktop.LiveTests/VirtualDesktopCommandTests.cs +++ b/tools/Azure.Mcp.Tools.VirtualDesktop/tests/Azure.Mcp.Tools.VirtualDesktop.LiveTests/VirtualDesktopCommandTests.cs @@ -187,7 +187,7 @@ public async Task Should_ListSessionHosts_WithSubscriptionId() var firstHostpool = hostpools[0].GetProperty("name").GetString()!; var result = await CallToolAsync( - "virtualdesktop_hostpool_sessionhost_list", + "virtualdesktop_hostpool_host_list", new() { { "subscription", Settings.SubscriptionId }, @@ -226,7 +226,7 @@ public async Task Should_ListSessionHosts_WithSubscriptionName() var firstHostpool = hostpools[0].GetProperty("name").GetString()!; var result = await CallToolAsync( - "virtualdesktop_hostpool_sessionhost_list", + "virtualdesktop_hostpool_host_list", new() { { "subscription", Settings.SubscriptionName }, @@ -266,7 +266,7 @@ public async Task Should_ListUserSessions_WithSubscriptionId() // Get session hosts for the first hostpool var sessionHostsResult = await CallToolAsync( - "virtualdesktop_hostpool_sessionhost_list", + "virtualdesktop_hostpool_host_list", new() { { "subscription", Settings.SubscriptionId }, @@ -279,7 +279,7 @@ public async Task Should_ListUserSessions_WithSubscriptionId() var firstSessionHost = sessionHosts.Value[0].GetProperty("name").GetString()!; var result = await CallToolAsync( - "virtualdesktop_hostpool_sessionhost_usersession_list", + "virtualdesktop_hostpool_host_user_list", new() { { "subscription", Settings.SubscriptionId }, @@ -325,7 +325,7 @@ public async Task Should_ListUserSessions_WithSubscriptionName() // Get session hosts for the first hostpool var sessionHostsResult = await CallToolAsync( - "virtualdesktop_hostpool_sessionhost_list", + "virtualdesktop_hostpool_host_list", new() { { "subscription", Settings.SubscriptionName }, @@ -338,7 +338,7 @@ public async Task Should_ListUserSessions_WithSubscriptionName() var firstSessionHost = sessionHosts.Value[0].GetProperty("name").GetString()!; var result = await CallToolAsync( - "virtualdesktop_hostpool_sessionhost_usersession_list", + "virtualdesktop_hostpool_host_user_list", new() { { "subscription", Settings.SubscriptionName },