MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / listTools

Function listTools

e2e/selfhost/mcp-session-idle-eviction.test.ts:113–124  ·  view source on GitHub ↗
(sessionId: string, id: number)

Source from the content-addressed store, hash-verified

111 });
112
113 const listTools = async (sessionId: string, id: number): Promise<Response> =>
114 fetch(mcpUrl, {
115 method: "POST",
116 headers: {
117 cookie: cookieHeader,
118 "mcp-session-id": sessionId,
119 "mcp-protocol-version": "2025-06-18",
120 "content-type": "application/json",
121 accept: "application/json, text/event-stream",
122 },
123 body: JSON.stringify({ jsonrpc: "2.0", id, method: "tools/list" }),
124 });
125
126 // 1. A client initializes and the session serves.
127 const opened = yield* Effect.promise(initialize);

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected