[BUG] Azure MCP error responses are hard for agents to act on (KQL errors, command names, auth mislabelled as connectivity)
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- azure, csharp
- Ambito
- backend-api-design
Direzione di ricerca
Start by tracing the implementations for monitor_resource_log_query, namespace command resolution, and azure-extension_cli_generate error handling; the issue names these entry points but not their source files. Compare their responses with the successful unknown-argument error, then run the three reproduction steps. Done means actionable structured errors, unique suffix matches handled in one call, and 400/401/403 responses no longer described as connectivity failures.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
Several Azure MCP error responses are hard for agents to act on, so agents retry blindly, abandon the tool, or fall back to az CLI. Each failed attempt keeps its error text in context, which adds turns and tokens.
Data from 140 Azure MCP-enabled trials (MCP-only and Skill+MCP arms) of the azure-diagnostics Azure Functions VNet evaluations in microsoft/GitHub-Copilot-for-Azure. Agent: GitHub Copilot CLI, gpt-5.6-sol, Azure MCP in namespace mode. Runs: 42935543800, 42942207249, 42945073201, 43118444840, 43289275378, 43345242602.
Out of 2,350 Azure MCP calls, 222 failed. "Recovered" means the agent's next call to the same tool succeeded.
| Category | Failures | Recovered | Main commands |
|---|---|---|---|
KQL semantic/argument errors (400 BadArgumentError) |
88 | 31 (35%) | monitor_resource_log_query (79) |
| Command name not exposed by namespace | 84 | 47 (56%) | get (32), diagnose (28), get_best_practices (15) |
| Sensitive-data elicitation not supported / other | 24 | 18 (75%) | execute_resource_action, appservice_webapp_settings_get-appsettings |
ARM NotFound |
8 | 4 (50%) | get_resource |
| Unknown arguments | 7 | 7 (100%) | applens_resource_diagnose (resourceId) |
| 401/403 | 6 | 0 (0%) | azure-extension_cli_generate (5) |
| 400 reported as 503 | 5 (+15 later runs) | appservice_webapp_diagnostic_diagnose, tracked in #4190 |
Specific problems:
- KQL errors bury the cause in a raw HTTP dump.
monitor_resource_log_queryreturns about 2 KB per error, including the fullStatus/ErrorCode/Content/Headersdump. The actionable part is three levels down (innererror.innererror.message). Most were'where' operator: Failed to resolve table or column expression named 'AppTraces': the agent queried a table that doesn't exist for that resource scope and wasn't told which tables do exist. Others wereArithmetic expression cannot be carried-out between R64 and TimeSpan(10). Only 35% recovered. - Command-not-available errors are recoverable but expensive. The message lists available commands, which helps (56% recovery vs 35%). But unambiguous suffix matches (
diagnose→applens_resource_diagnose, the only command) are still rejected and need a second round trip. - 401 from
azure-extension_cli_generateis labelled "Service unavailable or network connectivity issues" (status: 401,Response status code does not indicate success: 401 (Unauthorized)). None of these recovered. - Unknown-argument errors work well:
Request rejected due to unknown arguments: resourceIdrecovered 7/7. This is the model to follow.
Expected behavior
- Error responses lead with a short, structured cause: status, code, the innermost service message, and, where possible, a hint (e.g. "table 'AppTraces' not found for this resource; available tables: …", or "use a workspace query for Application Insights tables").
- Raw HTTP headers and diagnostic dumps are omitted or moved to a separate, optional field.
- When a requested command uniquely matches one exposed command by suffix, either run it or return
did you mean 'applens_resource_diagnose'?with its parameter schema, so the agent recovers in one call. - "Service unavailable or network connectivity issues" is used only for real 503s or connection failures, never for 400/401/403.
Actual behavior
See the table above. The agent's next call to the same tool succeeded after only 35% of KQL errors, 56% of command-name errors, and 0% of auth errors mislabelled as connectivity issues.
Example KQL error (truncated):
{"status":400,"message":"The request had some invalid properties\nStatus: 400 (Bad Request)\nErrorCode: BadArgumentError\n\nContent:\n{\"error\":{\"message\":\"The request had some invalid properties\",\"code\":\"BadArgumentError\",...,\"innererror\":{\"code\":\"SemanticError\",\"message\":\"A semantic error occurred.\",\"innererror\":{\"code\":\"SEM0100\",\"message\":\"'where' operator: Failed to resolve table or column expression named 'AppTraces'\"}}}}\n\nHeaders:\nDate: ...\nConnection: keep-alive\nVia: REDACTED\n...
Reproduction Steps
- Call
monitor_resource_log_queryagainst a Function App resource ID withAppTraces | where TimeGenerated > ago(1h). - Call the
applensnamespace tool withcommand: "diagnose". - Call
azure-extension_cli_generatewith a credential that receives a 401.
Environment
- Azure MCP Server version: the eval runner starts
npx -y @azure/mcp server startwithout a pinned version, so each run used the npmlatestversion at the time (fresh GitHub Actions runner, no npx cache). Based on run start times vs. npm publish times:4.0.0-beta.6for runs 42935543800, 42942207249, 42945073201 (2026-11-11 00:59–02:53Z);4.0.0-beta.7(published 2026-11-11 17:18Z) for runs 43118444840, 43289275378, 43345242602. The version is inferred because the runner doesn't log it. - Azure MCP Server (namespace mode) via GitHub Copilot CLI on Linux GitHub Actions runners; answer model
gpt-5.6-sol - Related: #4190 (400 → 503 in App Service diagnose), #4068 (discovery/misselection), #3183 (namespace-mode token cost), #3200 (output-size telemetry)
- Lingua principale
- C#
- Stelle
- 3.9k
- Fork
- 689
- Merge medio
- 2g 11h
- PR unite (30g)
- 143
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/mcp
-
[BUG] speech tts synthesize rejects valid locales such as fil-PH, yue-CN and sr-Latn-RS in --languageForse già presa @Shizoqua l’ha presa oggi. ApertaAzure.Mcp.Server needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
[BUG] deploy architecture diagram generate never shows Docker settings for container appsForse già presa @Shizoqua l’ha presa oggi. ApertaAzure.Mcp.Server needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 2 giorni
-
[BUG] Single mode: an unknown tool name fails with "An error occurred invoking 'azure'" instead of listing the available toolsForse già presa @Ahmed-Manai l’ha presa 10 giorni fa. Apertaserver-Azure.Mcp
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
[BUG] pricing get drops tierMinimumUnits, so tiered meters return same-meter prices with no thresholdForse già presa @msalaman l’ha presa 29 giorni fa. Apertacustomer-reported needs-team-triage question server-Azure.Mcp tools-Price tools-Pricing
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/mcp#4087 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
[Doc Gap] README.md still shows removed "Basic" resilience usage plan tier after GA SDK updateForse di nuovo libera @anishsinghhh3-bit l’ha presa 32 giorni fa e non c’è nessuna pull request aperta. Apertacopilot documentation server-Azure.Mcp tools-ResilienceManagement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
microsoft/mcp#4008 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di microsoft/mcp
Issue simili
-
bug documentation queries
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ClickHouse/clickhouse-cs#815 ·
I maintainer di solito rispondono entro 1 giorno
-
XML grammar: only the closing --> of a comment gets the scope comment.block.xmlForse già presa @alexeyfala l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
danipen/TextMateSharp#145 · 2 commenti ·
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Klyroo/klyroo-dashboard#12 ·
I maintainer di solito rispondono entro 1 giorno
-
CONTRIBUTING rules Node out in step 0, then tells client-side contributors to run node --test, which is what CI gates onForse già presa @yadavraj2001 l’ha presa oggi. Apertadocumentation good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
juandresrodca/AdminForge#73 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[辞書] VIVANTAperta要トリアージ 辞書
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno