[BUG]Sampling does not work in Vally or other MCP servers

Aperta
#4,232 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

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
28/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, wasm
Ambito
api

Direzione di ricerca

The error text 'Sampling request must end with a user message' comes from the MCP sampling flow when a server asks its host for a completion, so start by finding where this repository builds sampling requests and checks their message order. The reproduction is the external mcp-loading-eval.yaml in Azure/azure-sdk-pr, which is not in this repo, so first confirm which side produces the invalid message list. Done means a sampling request from the azure server completes without that error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug needs-author-feedback needs-team-triage needs-triage server-Azure.Mcp tools-BestPractices tools-Core
Describe the bug

When invoking the azure-best-practices tool from inside the Vally tool, requests fail with:

ERROR  azure-best-practices
  MCP sampling request 'd1f4bb7f-3f68-4a2f-bec0-0e77877f2f69' from server 'azure' failed: Sampling
  request must end with a user message

This essentially renders the MCP server useless from inside Vally evaluations or any MCP host that supports sampling because it appears that the rejection is blocking.

Expected behavior

Sampling works in Vally.

Actual behavior

Sampling fails :(

Reproduction Steps

https://github.com/Azure/azure-sdk-pr/blob/main/sdk-agentic-evaluations/Evaluations/scripts/mcp-loading-eval.yaml

Environment

No response

Lingua principale
C#
Stelle
3.9k
Fork
689
Merge medio
2g 11h
PR unite (30g)
143

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/mcp

Tutte le issue di microsoft/mcp

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.