MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / run_tool_fresh

Function run_tool_fresh

scripts/mcp_probe/isolated.py:36–48  ·  view source on GitHub ↗
(repo_name: str, repo_path: str, tool: str, queries: list[dict], log)

Source from the content-addressed store, hash-verified

34
35
36def run_tool_fresh(repo_name: str, repo_path: str, tool: str, queries: list[dict], log) -> None:
37 cli = McpClient(repo_path)
38 try:
39 for query in queries:
40 resp, dt = cli.call(tool, query, timeout=TIMEOUT)
41 st, detail = classify(resp, dt)
42 log.write(f"{repo_name}\t{tool}\t{json.dumps(query)[:120]}\t{st}\t{detail}\n")
43 log.flush()
44 if st == "TIMEOUT":
45 # The server is busy with the timed-out call; no point queuing more.
46 break
47 finally:
48 cli.close()
49
50
51def main() -> int:

Callers 1

mainFunction · 0.85

Calls 6

callMethod · 0.95
closeMethod · 0.95
McpClientClass · 0.90
classifyFunction · 0.90
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected