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

Function closeConnection

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

Source from the content-addressed store, hash-verified

190 );
191
192const closeConnection = (connection: {
193 readonly close: () => Promise<void>;
194}): Effect.Effect<void, never> =>
195 Effect.ignore(
196 Effect.tryPromise({
197 try: () => connection.close(),
198 catch: () =>
199 new McpToolDiscoveryError({
200 stage: "list_tools",
201 message: "Failed closing MCP connection",
202 }),
203 }),
204 );

Callers 1

discoverToolsFunction · 0.70

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected