MCP: the first tool call after a handshake can run before the client's roots arrive

Aperta
#267 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend, cli

Direzione di ricerca

Start in src/wheelgap/mcp.py and trace how the 2024–2025 handshake handles roots/list and relative path arguments. Then read the stdio harness in tests/test_mcp.py and add the immediate-call case with a delayed roots response. Done when the call resolves against the client's root; also cover the bounded fallback and its notes entry, and describe the manual mcp SDK check in the PR.

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

Descrizione

help wanted

On the 2024–2025 handshake path, the server asks the client for roots/list after notifications/initialized. The official Python SDK sends its first tools/call straight away, so that call runs before the roots answer and a relative path is resolved against the server's working directory instead of the client's project. Calls made a moment later resolve correctly.

What to do

  • In src/wheelgap/mcp.py, when a roots/list request is outstanding and a call has a relative path argument, wait for the answer (with a short bound, e.g. 2 s) before resolving it. If the bound passes, fall back as today and add a notes entry saying so.
  • On the 2026-07-28 path this doesn't apply (roots come with the request).
  • Test with the existing stdio harness in tests/test_mcp.py: a call sent immediately after initialized, with roots answered after a small delay, resolves against the root.
  • Describe a by-hand check with the mcp SDK in the PR.
Lingua principale
Python
Stelle
0
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

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 patrickballard/wheelgap

Tutte le issue di patrickballard/wheelgap

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.