MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / list_roots

Method list_roots

src/mcp/server/session.py:247–257  ·  view source on GitHub ↗

Send a roots/list request. Raises: NoBackChannelError: The connection has no back-channel for server-initiated requests.

(self)

Source from the content-addressed store, hash-verified

245
246 @deprecated("The roots capability is deprecated as of 2026-07-28 (SEP-2577).", category=MCPDeprecationWarning)
247 async def list_roots(self) -> types.ListRootsResult:
248 """Send a roots/list request.
249
250 Raises:
251 NoBackChannelError: The connection has no back-channel for
252 server-initiated requests.
253 """
254 return await self.send_request(
255 types.ListRootsRequest(),
256 types.ListRootsResult,
257 )
258
259 async def elicit(
260 self,

Calls 1

send_requestMethod · 0.95