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:
cliffhall
2025-12-13 15:41:44 -05:00
parent 77deef08ce
commit 6854902775
2 changed files with 20 additions and 15 deletions

View File

@@ -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[]
>();