Send a request to the peer on the back-channel. Raises: MCPError: The peer responded with an error. NoBackChannelError: `can_send_request` is `False`.
(
self,
method: str,
params: Mapping[str, Any] | None,
opts: CallOptions | None = None,
)
| 60 | return self._meta |
| 61 | |
| 62 | async def send_raw_request( |
| 63 | self, |
| 64 | method: str, |
| 65 | params: Mapping[str, Any] | None, |
| 66 | opts: CallOptions | None = None, |
| 67 | ) -> dict[str, Any]: |
| 68 | """Send a request to the peer on the back-channel. |
| 69 | |
| 70 | Raises: |
| 71 | MCPError: The peer responded with an error. |
| 72 | NoBackChannelError: `can_send_request` is `False`. |
| 73 | """ |
| 74 | return await self._dctx.send_raw_request(method, params, opts) |
| 75 | |
| 76 | async def notify(self, method: str, params: Mapping[str, Any] | None, opts: CallOptions | None = None) -> None: |
| 77 | """Send a notification to the peer on the back-channel.""" |
no outgoing calls