Repository navigation
[BUG] Azure Terraform aztfexport descriptions cause placeholder resource IDs and indirect tool routing #3813
Copy link
Copy link
Closed
Labels
Azure.Mcp.Servercustomer-reportedneeds-team-triageWorkflow: This issue needs the team to triage.Workflow: This issue needs the team to triage.questionFurther information is requestedFurther information is requestedserver-Azure.McpAzure.Mcp.ServerAzure.Mcp.Servertools-Deploy
Description
Describe the bug
The Azure Terraform tool descriptions do not tell the model enough about the aztfexport tools. The azureterraform namespace description mentions only "aztfexport command generation" without saying what it exports. The aztfexport resource and aztfexport resourcegroup descriptions do not say what distinguishes each tool or what to do when a required input is missing.
As a result, the tools are selected, but not reliably in the right way:
- For a request with no resource ID, the model calls
azureterraform_aztfexport_resourcewith an invented placeholder ID instead of asking for the ID. - In all-tools mode, the model always calls a best-practices tool before the export tool, which adds a round trip to every export request.
Expected behavior
- For "Generate an aztfexport command to export a single Azure resource to Terraform" (
clarification-requiredine2eTestPrompts.md), the agent asks for the resource ID and does not invoke the tool with an invented ID. - For export prompts that name a resource ID or resource group, the agent selects the matching
aztfexportcommand directly, forwardsprovider=azapiwhen requested, and never selects the other export command. - The namespace description states what
aztfexportexports, so namespace-mode discovery reflects the tool's purpose.
Actual behavior
Tested on main at 09dce10e7, before #3737, with gpt-5.6-sol, the model named in #3553:
| Prompt | Mode | Result |
|---|---|---|
| Generate an aztfexport command to export a single Azure resource to Terraform | namespace | 4 of 5 runs called azureterraform_aztfexport_resource with a placeholder ID, such as /subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/<resource-provider>/<resource-type>/<resource-name> |
| Export tasks from #3553 and the resource ID prompt (4 prompts) | all tools | The export tool was the first Azure MCP tool in 0 of 9 sessions with tool calls; azureterraformbestpractices_get always ran first. Mean session time was 53.0 s. |
| Export all resources in resource group my-rg to Terraform; export with the azapi provider; export by resource ID | namespace and all tools | The expected command was selected in 15 of 15 namespace runs and 9 of 9 all-tools runs. |
Reproduction Steps
- Build Azure MCP Server from
mainat09dce10e7. - Start the server with
azmcp server start --mode namespace, then repeat with--mode all. - Connect an agent using
gpt-5.6-solwith the server as its only MCP server and no custom instructions. - Send each prompt in a fresh session:
Generate an aztfexport command to export a single Azure resource to TerraformExport all resources in resource group my-rg to TerraformExport resource group my-rg to Terraform using the azapi providerExport the resource /subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<account> to Terraform
- Inspect the MCP tool calls:
- For the first prompt, check whether
resource-idcontains a placeholder. - In all-tools mode, check which Azure MCP tool the agent calls first.
- For the first prompt, check whether
No Azure credentials or aztfexport installation are needed. Without aztfexport, the export tools return installation guidance, which does not affect tool selection.
Environment
- Hosting platform: Windows, local stdio transport
- Azure MCP Server: built from source at
09dce10e7, Debug build - Agent: GitHub Copilot SDK
1.0.11with Copilot runtime1.0.80, as bundled with Vally0.16.0, not VS Code agent mode - Model:
gpt-5.6-sol - Sample: 64 sessions comparing
09dce10e7with Update export tool discovery description for Azure Terraform tools #3737. Each prompt and build ran 5 times in namespace mode and 3 times in all-tools mode. Model output is nondeterministic, so these rates are indicative only.
Fix proposed in #3737.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Azure.Mcp.Servercustomer-reportedneeds-team-triageWorkflow: This issue needs the team to triage.Workflow: This issue needs the team to triage.questionFurther information is requestedFurther information is requestedserver-Azure.McpAzure.Mcp.ServerAzure.Mcp.Servertools-Deploy
Activity
github-actions commentedon Sep 30, 2026
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @microsoft/azure-mcp.