We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8afaefd commit e1203dfCopy full SHA for e1203df
src/mcp/client/session.py
@@ -121,15 +121,11 @@ async def initialize(self) -> types.InitializeResult:
121
if self._sampling_callback is not _default_sampling_callback
122
else None
123
)
124
- if self._list_roots_callback is _default_list_roots_callback:
125
- roots = None
126
- else:
127
- roots = types.RootsCapability(
128
- # TODO: Should this be based on whether we
129
- # _will_ send notifications, or only whether
130
- # they're supported?
131
- listChanged=True,
132
- )
+ roots = (
+ types.RootsCapability(listChanged=True)
+ if self._list_roots_callback is not _default_list_roots_callback
+ else None
+ )
133
134
result = await self.send_request(
135
types.ClientRequest(
0 commit comments