File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,11 @@ async def initialize(self) -> types.InitializeResult:
140140 )
141141 ),
142142 types .InitializeResult ,
143+ # TODO should set a request_read_timeout_seconds as per
144+ # guidance from BaseSession.send_request not obvious
145+ # what subsequent process should be, refer the following
146+ # specification for more details
147+ # https://modelcontextprotocol.io/specification/2025-03-26/basic/utilities/cancellation
143148 cancellable = False ,
144149 )
145150
Original file line number Diff line number Diff line change @@ -229,6 +229,18 @@ async def send_request(
229229 response contains an error. If a request read timeout is provided, it
230230 will take precedence over the session read timeout.
231231
232+ If cancellable is set to False then the request will wait
233+ request_read_timeout_seconds to complete and ignore any attempt to
234+ cancel via the anyio.CancelScope within which this method was called.
235+
236+ If cancellable is set to True (default) if the anyio.CancelScope within
237+ which this method was called is cancelled it will generate a
238+ CancelationNotfication and send this to the server which should then abort
239+ the task however this is not guaranteed.
240+
241+ For further information on the CancelNotification flow refer to
242+ https://modelcontextprotocol.io/specification/2025-03-26/basic/utilities/cancellation
243+
232244 Do not use this method to emit notifications! Use send_notification()
233245 instead.
234246 """
You can’t perform that action at this time.
0 commit comments