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

Function closeConnection

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

Source from the content-addressed store, hash-verified

132 );
133
134const closeConnection = (connection: {
135 readonly close: () => Promise<void>;
136}): Effect.Effect<void, never> =>
137 Effect.ignore(
138 Effect.tryPromise({
139 try: () => connection.close(),
140 catch: () =>
141 new McpToolDiscoveryError({
142 stage: "list_tools",
143 message: "Failed closing MCP connection",
144 }),
145 }),
146 );

Callers 1

discoverToolsFunction · 0.70

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected