In roots.ts, clientCapabilites.roots and response.roots are optional.
Fixes #2818
This commit is contained in:
parent
7300631a5c
commit
677f40a38f
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ export const syncRoots = async (server: McpServer, sessionId?: string) => {
|
|||
const response = await server.server.listRoots();
|
||||
if (response && "roots" in response) {
|
||||
// Store the roots list for this client
|
||||
roots.set(sessionId, response?.roots);
|
||||
roots.set(sessionId, response.roots);
|
||||
|
||||
// Notify the client of roots received
|
||||
await server.sendLoggingMessage(
|
||||
|
|
|
|||
Loading…
Reference in a new issue