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

Function callToolsListWithSession

e2e/selfhost/toolkits-mcp.test.ts:53–68  ·  view source on GitHub ↗
(
  url: string,
  bearer: string,
  sessionId: string,
)

Source from the content-addressed store, hash-verified

51};
52
53const callToolsListWithSession = async (
54 url: string,
55 bearer: string,
56 sessionId: string,
57): Promise<Response> =>
58 fetch(url, {
59 method: "POST",
60 headers: {
61 authorization: `Bearer ${bearer}`,
62 "mcp-session-id": sessionId,
63 "mcp-protocol-version": "2025-03-26",
64 "content-type": "application/json",
65 accept: "application/json, text/event-stream",
66 },
67 body: JSON.stringify({ jsonrpc: "2.0", id: 2, method: "tools/list" }),
68 });
69
70scenario(
71 "Toolkits · self-host MCP exposes only the toolkit's allowed tools",

Callers 1

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected