From e1c1dcfac88ba5d41aa810dcdcf4e671b4daa3f4 Mon Sep 17 00:00:00 2001 From: cliffhall Date: Sat, 13 Dec 2025 15:42:24 -0500 Subject: [PATCH] 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 --- src/everything/tools/get-roots-list.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/everything/tools/get-roots-list.ts b/src/everything/tools/get-roots-list.ts index 0e192d0c..c9977dc5 100644 --- a/src/everything/tools/get-roots-list.ts +++ b/src/everything/tools/get-roots-list.ts @@ -19,9 +19,8 @@ const config = { * The registered tool interacts with the MCP roots capability, which enables the server to access * information about the client's workspace directories or file system roots. * - * When supported by the client, the server automatically retrieves and formats the current list - * of roots from the client upon connection and whenever the client sends a `roots/list_changed` - * notification. + * When supported, the server automatically retrieves and formats the current list of roots from the + * client upon connection and whenever the client sends a `roots/list_changed` notification. * * Therefore, this tool displays the roots that the server currently knows about for the connected * client. If for some reason the server never got the initial roots list, the tool will request the