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

Function closeConnection

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

Source from the content-addressed store, hash-verified

241 );
242
243const closeConnection = (connection: {
244 readonly close: () => Promise<void>;
245}): Effect.Effect<void, never> =>
246 Effect.ignore(
247 Effect.tryPromise({
248 try: () => connection.close(),
249 catch: () =>
250 new McpToolDiscoveryError({
251 stage: "list_tools",
252 message: "Failed closing MCP connection",
253 }),
254 }),
255 );

Callers 1

discoverToolsFunction · 0.70

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected