@@ -323,10 +323,6 @@ export interface AgentToolset {
323323 // second add of an active name; failed rows retry through connectMCPServer
324324 // without a second persist. Still true while disable is in progress.
325325 hasMCPServer : ( name : string ) => boolean ;
326- // Live MCP handshake depth: non-zero while any server is still connecting.
327- // tool_search consults this on a miss — waiting briefly and reporting a
328- // retry signal instead of a definitive negative mid-handshake.
329- pendingMcpConnectionCount : ( ) => number ;
330326 // Bounded wait for in-flight MCP handshakes; resolves to the remaining
331327 // count. Capped by `timeoutMs` so a hung authorization never hangs the
332328 // caller — the tool_search bound passes briefly by default.
@@ -762,10 +758,6 @@ export async function createAgentToolset(
762758 const connectedClients = new Map < string , MCPClient > ( ) ;
763759 const inFlightConnections = new Map < string , Promise < void > > ( ) ;
764760 const inFlightEpochs = new Map < string , number > ( ) ;
765- // Live handshake depth for tool_search: a miss waits briefly for these
766- // before answering, so a mid-handshake search finds late-mounting tools
767- // instead of reporting a definitive negative.
768- const pendingMcpConnectionCount = ( ) : number => inFlightConnections . size ;
769761 // Bounded wait for in-flight handshakes; resolves to the remaining count.
770762 // Capped by `timeoutMs` so a hung authorization never hangs the caller.
771763 const awaitPendingMcpConnections = async (
@@ -1260,7 +1252,6 @@ export async function createAgentToolset(
12601252 disconnectMCPServer : publicDisconnectMCPServer ,
12611253 hasMCPServer : ( name ) =>
12621254 connectedClients . has ( name ) || inFlightConnections . has ( name ) ,
1263- pendingMcpConnectionCount,
12641255 awaitPendingMcpConnections,
12651256 setMcpServersSource : ( source ) => {
12661257 mcpServersSource = source ;
0 commit comments