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

Method call

scripts/mcp_probe/probe.py:191–205  ·  view source on GitHub ↗
(self, tool: str, args: dict, timeout: float = TIMEOUT)

Source from the content-addressed store, hash-verified

189 # ------------------------------------------------------------------ public
190
191 def call(self, tool: str, args: dict, timeout: float = TIMEOUT) -> tuple[dict | None, float]:
192 rid = self._next()
193 self._send({
194 "jsonrpc": "2.0",
195 "method": "tools/call",
196 "params": {"name": tool, "arguments": args},
197 "id": rid,
198 })
199 t0 = time.time()
200 resp = self._recv_id(rid, timeout=timeout)
201 dt = time.time() - t0
202 if isinstance(resp, dict) and resp.get("_timeout"):
203 # Caller is giving up — mark id stale so a late reply is dropped.
204 self._stale.add(rid)
205 return resp, dt
206
207 def close(self) -> None:
208 try:

Callers 15

mainFunction · 0.95
run_tool_freshFunction · 0.95
discoverFunction · 0.45
delete_jsonFunction · 0.45
get_jsonFunction · 0.45
wait_for_dashboardFunction · 0.45
bySlugFunction · 0.45
withMockedFetchFunction · 0.45
importBundledModuleFunction · 0.45

Calls 4

_nextMethod · 0.95
_sendMethod · 0.95
_recv_idMethod · 0.95
addMethod · 0.45