Client: an abandoned call_tool sends no notifications/cancelled — the MRTR helper hides each round's RequestHandle
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start by reading RunningService::call_tool, call_tool_with_mrtr_max_rounds, and peer.call_tool_once to trace how each round's RequestHandle is managed. The issue identifies three possible approaches; assess how cancellation interacts with retries and input_required handling. Done means an abandoned or cancelled call sends notifications/cancelled for its in-flight round.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
rmcp 3.5.0, client side. A caller that abandons a tools/call — its own deadline passed, say — has no way to tell the server, because the MRTR helper hides the request it is waiting on.
RunningService::call_tool (via call_tool_with_mrtr_max_rounds) drives each round with peer.call_tool_once → send_request, which awaits a RequestHandle internally. So:
- Dropping the
call_toolfuture sends nothing.RequestHandlehas noDropbehaviour;send_timeout_cancel_notificationruns only when the handle's ownPeerRequestOptionstimeout fires. A wrapper liketokio::time::timeout(bound, service.call_tool(params))abandons the request locally while the server keeps working on it, and its response stream stays open until the server answers or the socket's idle timeout fires. - A caller can't drive the rounds itself either.
send_cancellable_request/send_request_with_optionreturn aRequestHandlewithcancel(), but answering aninput_requiredround needsprepare_input_required_retry, which is private. Re-implementing it means re-implementing the elicitation hand-off to the localClientHandler.
A call_tool that can be cancelled through any of these would do:
- A drop guard in the MRTR driver that holds the current round's
RequestHandleand sendsnotifications/cancelledfor it when the future is dropped mid-round (the cheapest; it covers everytimeout/select!caller). - An option on
call_toolfor a total deadline or aCancellationToken, which sendsnotifications/cancelledfor the round in flight when it fires (the spirit ofPeerRequestOptions::max_total_timeout, across rounds). prepare_input_required_retrymade public, so callers can drive rounds withsend_cancellable_request.
(1) seems the most useful, since abandoning a future is how most async callers bound a call.
Context: agentd bounds every tool call it makes on behalf of a workflow step or a model turn. Today an abandoned call is documented as "not cancelled" because of this (crates/mcp/src/rmcp_client.rs, call_tool).
- Lingua principale
- Rust
- Stelle
- 4k
- Fork
- 662
- Merge medio
- 3g 20h
- PR unite (30g)
- 30
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun 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 modelcontextprotocol/rust-sdk
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP statusForse già presa @aton-of-data l’ha presa 5 giorni fa. Apertabug P2 ready for work T-security T-transport
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
modelcontextprotocol/rust-sdk#1339 ·
I maintainer di solito rispondono entro 2 giorni
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopeForse già presa @jstar0 l’ha presa 7 giorni fa. Apertabug P1 ready for work T-security T-transport
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
modelcontextprotocol/rust-sdk#1330 ·
I maintainer di solito rispondono entro 2 giorni
-
P3 question Stale T-documentation T-enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
modelcontextprotocol/rust-sdk#1155 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Expose OAuth discovery and registration results for application-owned flowsForse già presa @connor4312 l’ha presa oggi. Apertaenhancement P2 ready for work T-security
modelcontextprotocol/rust-sdk#1371 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Two rmcp tests fail on Windows: connection-refused text check and `npm` spawn in test_with_jsForse già presa @bolinfest l’ha presa 1 giorno fa. Apertabug P2 ready for work T-test
modelcontextprotocol/rust-sdk#1364 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di modelcontextprotocol/rust-sdk
Issue simili
-
area: compat area: parsing bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
reubeno/brush#1526 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
OFN writer emits `DocIRI` as a bare IRI, which becomes a version IRI or a parse error on re-readAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
phillord/horned-owl#338 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
stackabletech/operator-rs#1301 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
jmcnamara/rust_xlsxwriter#205 · 4 commenti ·