Skip to content

[Doc Gap] azmcp advisor recommendation apply - missing valid --resource values documentation #2762

Description

@github-actions

Documentation Gap

Server: Azure.Mcp.Server
Tool directory: tools/Azure.Mcp.Tools.Advisor
Triggered by: 9fca387 (PR #2686) by @ankiga-MSFT
Changed files:

  • tools/Azure.Mcp.Tools.Advisor/src/Commands/Recommendation/RecommendationApplyCommand.cs (new)
  • servers/Azure.Mcp.Server/docs/azmcp-commands.md (modified)
  • servers/Azure.Mcp.Server/docs/e2eTestPrompts.md (modified)
  • servers/Azure.Mcp.Server/README.md (modified)

What Changed

PR #2686 added a new azmcp advisor recommendation apply command that returns IaaC rules (ARM/Terraform) for applying Advisor recommendations to a specific Azure resource type. The command requires a --resource parameter that accepts only a specific set of valid resource type identifiers.

Gaps Found

  • The --resource parameter documentation in azmcp-commands.md shows --resource <resource> but provides no description of what values are valid. The command validates against a hard-coded list of ~20 resource types, and users have no way to discover valid values without getting an error or reading source code.
  • The valid resource type identifiers (e.g., compute_virtualmachines, storage_storageaccounts) do not follow a pattern users would intuitively guess, making the parameter especially difficult to use without documentation.

Files to Update

  • servers/Azure.Mcp.Server/docs/azmcp-commands.md

Context

The RecommendationApplyCommand.cs validates --resource against an embedded resource list. The 20 supported resource type values are:

aad_domainservices
apimanagement_service
cognitiveservices_accounts
compute_virtualmachines
compute_virtualmachinescalesets
containerregistry_registries
containerservice_managedclusters
dbforpostgresql_flexibleservers
documentdb_databaseaccounts
keyvault_vaults
kubernetes_connectedclusters
kubernetesconfiguration_extensions
netapp_volumes
network_applicationgatewaywebapplicationfirewallpolicies
network_expressrouteports
network_frontdoorwebapplicationfirewallpolicies
sql_managedinstances
storage_storageaccounts
web_serverfarms
web_staticsites

Current docs entry:

# Apply Advisor recommendation to create or modify IaaC files (like ARM, Terraform) for Azure resources
# ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired
azmcp advisor recommendation apply --resource <resource>
📐 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.md
Action: Edit

In the ### Azure Advisor Operations section, expand the azmcp advisor recommendation apply entry to document the valid --resource values. Replace:

# Apply Advisor recommendation to create or modify IaaC files (like ARM, Terraform) for Azure resources
# ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired
azmcp advisor recommendation apply --resource <resource>

With:

# Apply Advisor recommendation to create or modify IaaC files (like ARM, Terraform) for Azure resources
# ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired
# Supported --resource values:
#   aad_domainservices, apimanagement_service, cognitiveservices_accounts,
#   compute_virtualmachines, compute_virtualmachinescalesets,
#   containerregistry_registries, containerservice_managedclusters,
#   dbforpostgresql_flexibleservers, documentdb_databaseaccounts,
#   keyvault_vaults, kubernetes_connectedclusters, kubernetesconfiguration_extensions,
#   netapp_volumes, network_applicationgatewaywebapplicationfirewallpolicies,
#   network_expressrouteports, network_frontdoorwebapplicationfirewallpolicies,
#   sql_managedinstances, storage_storageaccounts, web_serverfarms, web_staticsites
azmcp advisor recommendation apply --resource <resource>

Step 2: Verify documentation structure

servers/Azure.Mcp.Server/docs/azmcp-commands.md — must include:

  • A global options table at the top (subscription, resource-group, tenant, retry-max-retries, retry-delay)
  • One section per command containing a description and example usage block

Step 3: Validate

Run these commands in order:

  1. dotnet build servers/Azure.Mcp.Server/ — confirms the server project compiles cleanly
  2. dotnet build tools/Azure.Mcp.Tools.Advisor/src/ — confirms the affected toolset compiles
  3. dotnet test tools/Azure.Mcp.Tools.Advisor/tests/Azure.Mcp.Tools.Advisor.Tests/ --filter "TestType!=Live" — runs unit tests
  4. .\eng\common\spelling\Invoke-Cspell.ps1 — checks spelling in new or 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

Generated by Documentation Updater · ● 6M ·

Metadata

Metadata

Assignees

No one assigned

    Labels

    copilotdocumentationImprovements or additions to documentation

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions