( url: string, bearer: string, sessionId: string, )
| 51 | }; |
| 52 | |
| 53 | const 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 | |
| 70 | scenario( |
| 71 | "Toolkits · self-host MCP exposes only the toolkit's allowed tools", |
no test coverage detected