Skip to content

Commit 17aaa45

Browse files
committed
Sync roots at startup. This was deferred to list_roots tool is used, but I'm putting it back.
* In server/roots.ts - Updated function doc
1 parent f8933ec commit 17aaa45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/everything/server/roots.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export const roots: Map<string | undefined, Root[]> = new Map<
2020
* notification handler. This ensures that updates are automatically fetched and handled
2121
* in real-time.
2222
*
23-
* Therefore, calls to this function should only request roots from the client once per
24-
* session, but the cache will always be up to date after that first call.
23+
* This function is idempotent. It should only request roots from the client once per session,
24+
* returning the cached version thereafter.
2525
*
2626
* @param {McpServer} server - An instance of the MCP server used to communicate with the client.
2727
* @param {string} [sessionId] - An optional session id used to associate the roots list with a specific client session.

0 commit comments

Comments
 (0)