mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-02-19 11:54:58 -05:00
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
This commit is contained in:
@@ -20,8 +20,8 @@ export const roots: Map<string | undefined, Root[]> = new Map<
|
||||
* notification handler. This ensures that updates are automatically fetched and handled
|
||||
* in real-time.
|
||||
*
|
||||
* Therefore, calls to this function should only request roots from the client once per
|
||||
* session, but the cache will always be up to date after that first call.
|
||||
* This function is idempotent. It should only request roots from the client once per session,
|
||||
* returning the cached version thereafter.
|
||||
*
|
||||
* @param {McpServer} server - An instance of the MCP server used to communicate with the client.
|
||||
* @param {string} [sessionId] - An optional session id used to associate the roots list with a specific client session.
|
||||
|
||||
Reference in New Issue
Block a user