MCPcopy Create free account
hub / github.com/anus-dev/ANUS / waitForToolCall

Method waitForToolCall

integration-tests/test-helper.ts:375–392  ·  view source on GitHub ↗
(toolName: string, timeout?: number)

Source from the content-addressed store, hash-verified

373 }
374
375 async waitForToolCall(toolName: string, timeout?: number) {
376 // Use environment-specific timeout
377 if (!timeout) {
378 timeout = this.getDefaultTimeout();
379 }
380
381 // Wait for telemetry to be ready before polling for tool calls
382 await this.waitForTelemetryReady();
383
384 return this.poll(
385 () => {
386 const toolLogs = this.readToolLogs();
387 return toolLogs.some((log) => log.toolRequest.name === toolName);
388 },
389 timeout,
390 100,
391 );
392 }
393
394 async waitForAnyToolCall(toolNames: string[], timeout?: number) {
395 // Use environment-specific timeout

Calls 4

getDefaultTimeoutMethod · 0.95
waitForTelemetryReadyMethod · 0.95
pollMethod · 0.95
readToolLogsMethod · 0.95

Tested by

no test coverage detected