Client: an abandoned call_tool sends no notifications/cancelled — the MRTR helper hides each round's RequestHandle
Los mantenedores suelen responder en 3 días
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- Rust
- Estrellas
- 4k
- Forks
- 662
- Merge medio
- 3 d 7 h
- PR fusionados (30 d)
- 37
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelcontextprotocol/rust-sdk
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP statusPosiblemente ocupada @aton-of-data la tomó hace 1 día. Abiertobug P2 ready for work T-security T-transport
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
modelcontextprotocol/rust-sdk#1339 ·
Los mantenedores suelen responder en 3 días
-
rmcp and rmcp-macros crates no longer include LICENSE (regression since 1.3.0)Posiblemente ocupada @Steeve-Crypto la tomó hace 1 día. Abiertobug P2 ready for work T-config
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
modelcontextprotocol/rust-sdk#1335 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopePosiblemente ocupada @jstar0 la tomó hace 4 días. Abiertobug P1 ready for work T-security T-transport
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
modelcontextprotocol/rust-sdk#1330 ·
Los mantenedores suelen responder en 3 días
-
P3 question Stale T-documentation T-enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
modelcontextprotocol/rust-sdk#1155 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
A request whose `id` is not an i64 or a string is parsed as a notificationPosiblemente ocupada @talhayme la tomó hoy. Abiertobug P1 ready for work T-core T-model
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
modelcontextprotocol/rust-sdk#1345 ·
Los mantenedores suelen responder en 3 días
Todos los issues de modelcontextprotocol/rust-sdk
Issues similares
-
area::tern difficulty::easy good first issue kind::cleanup triage::ready
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
eclipse-zenoh/zenoh#2842 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
中文字符导致软件崩溃Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Y-ASLant/ElegantClipboard#172 ·
-
bug documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
SaboLabs/soroban-devkit#341 ·
Los mantenedores suelen responder en 1 día
-
agent:sonnet-high enhancement priority: P2 ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
shep-pm/shep-kelpie#652 ·
Los mantenedores suelen responder en 1 día