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

Function closeConnection

packages/plugins/mcp/src/sdk/discover.ts:249–259  ·  view source on GitHub ↗
(connection: {
  readonly close: () => Promise<void>;
})

Source from the content-addressed store, hash-verified

247 );
248
249const closeConnection = (connection: {
250 readonly close: () => Promise<void>;
251}): Effect.Effect<void, never> =>
252 Effect.tryPromise({
253 try: () => connection.close(),
254 catch: () =>
255 new McpToolDiscoveryError({
256 stage: "list_tools",
257 message: "Failed closing MCP connection",
258 }),
259 }).pipe(Effect.timeout(CLOSE_TIMEOUT), Effect.ignore);

Callers 1

discoverToolsFunction · 0.70

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected