MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / tryRun

Method tryRun

src/mcp/query-pool.ts:488–491  ·  view source on GitHub ↗

* run, but only when a warm worker is idle right now, so the call * starts at once; null, with nothing queued, when every worker is busy or * none has finished its cold start. For a caller that has its own way to * answer and must not wait behind other calls: the prompt hook (#3284)

(toolName: string, args: Record<string, unknown>)

Source from the content-addressed store, hash-verified

486 * queue), so the job goes straight to it.
487 */
488 tryRun(toolName: string, args: Record<string, unknown>): Promise<ToolResult> | null {
489 if (!this.healthy || !this.ready || this.idle.length === 0) return null;
490 return this.run(toolName, args);
491 }
492
493 private startSettled(w: PoolWorker): void {
494 const start = this.starts.get(w);

Callers 2

executeMethod · 0.80

Calls 1

runMethod · 0.95

Tested by

no test coverage detected