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

Function run

packages/plugins/mcp/src/sdk/connection-pool.ts:114–122  ·  view source on GitHub ↗
(forceFresh: boolean)

Source from the content-addressed store, hash-verified

112 const withConnection: McpConnectionPool["withConnection"] = (key, connector, use) => {
113 let reused = false;
114 const run = (forceFresh: boolean) =>
115 Effect.acquireUseRelease(
116 acquire(key, connector, forceFresh),
117 (lease) => {
118 if (!forceFresh) reused = lease.reused;
119 return use(lease.connection);
120 },
121 (lease, exit) => release(key, lease, exit),
122 );
123
124 return run(false).pipe(
125 Effect.catch((error) =>

Callers 1

withConnectionFunction · 0.70

Calls 3

acquireFunction · 0.85
releaseFunction · 0.85
useFunction · 0.70

Tested by

no test coverage detected