[BUG] Single mode: an unknown tool name fails with "An error occurred invoking 'azure'" instead of listing the available tools
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
Direzione di ricerca
Inizia da SingleProxyToolLoader.GetToolsInGroupAsync, dove la KeyNotFoundException proveniente da IMcpDiscoveryStrategy.GetOrCreateClientAsync viene rilanciata per un nome di strumento sconosciuto. Confrontala con il ramo IsNamespaceAllowed false, che restituisce una lista vuota, e verifica come CommandModeAsync e ToolLearnModeAsync usano quella lista vuota. È completato quando uno strumento sconosciuto restituisce la lista degli strumenti radice, come già verifica il test CallToolHandler_WithDisabledNamespace_DoesNotLearnOrExecute per i namespace disabilitati, e la telemetria di ToolArea e ToolName resta Unknown.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
In single mode (server start --mode single), calling the azure tool with a tool name that doesn't exist fails with an opaque error. The model gets nothing it can use to correct the call:
An error occurred invoking 'azure'.
SingleProxyToolLoader.GetToolsInGroupAsync rethrows the KeyNotFoundException from IMcpDiscoveryStrategy.GetOrCreateClientAsync. Its callers already have a fallback for "no tools in this group": CommandModeAsync and ToolLearnModeAsync return the root list of available tools when the list is empty. That fallback is used for a namespace that isn't enabled (CallToolHandler_WithDisabledNamespace_DoesNotLearnOrExecute), but an unknown name throws before it can run. The Azure server always has a discovery strategy (for the registry servers), so this is the path every unknown name takes.
Namespace mode handles the same mistake well: an unknown command returns "The command '...' is not available for the 'aks' tool. Available commands: ...".
To reproduce
Azure.Mcp.Server 4.0.0-beta.10 and main (6dd224f), started with dnx Azure.Mcp --prerelease --yes -- server start --mode single:
{ "intent": "get node pool", "tool": "nope", "command": "nodepool_get", "parameters": {} }
Result: isError: true, An error occurred invoking 'azure'.
The same happens with "learn": true.
Expected behavior
An unknown tool gets the same answer as a namespace that is not enabled: the list of available tools, so the model can pick a valid one. The ToolArea and ToolName telemetry tags stay Unknown, as they are today.
Possible fix
Return an empty list from GetToolsInGroupAsync for an unknown name instead of throwing, as it already does when IsNamespaceAllowed is false. I have a PR ready with the updated test.
- 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] 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
-
[Doc Gap] Azure Backup protect/update-protection/undelete docs missing new `OperationId` field and updated `JobId` semanticsForse di nuovo libera @akhil9tiet l’ha presa 50 giorni fa e non c’è nessuna pull request aperta. Apertacopilot documentation server-Azure.Mcp tools-AzureBackup
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
microsoft/mcp#3962 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di microsoft/mcp
Issue simili
-
fix: [v5] FluentTextInput throws from ElementInternals during .NET 11 enhanced form navigationAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
microsoft/fluentui-blazor#5721 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Project dependencies are outdatedForse già presa @yasmoradi l’ha presa oggi. Apertadependencies
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bitfoundation/bitplatform#15616 ·
I maintainer di solito rispondono entro 1 giorno
-
:watch: Not Triaged Pri3
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
I maintainer di solito rispondono entro 1 giorno
-
area-controls-shell platform/android
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
dotnet/maui#41304 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno