mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-20 21:05:17 +02:00
Use roots cache in get-roots-list tool
* In get-roots-list.ts, query the server's cache of the latest roots from the client and only request the list from the client if it doesn't exist. * In roots.ts, export the roots map
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
} from "@modelcontextprotocol/sdk/types.js";
|
||||
|
||||
// Track roots by session id
|
||||
const roots: Map<string | undefined, Root[]> = new Map<
|
||||
export const roots: Map<string | undefined, Root[]> = new Map<
|
||||
string | undefined,
|
||||
Root[]
|
||||
>();
|
||||
|
||||
Reference in New Issue
Block a user