MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / enable_replay

Method enable_replay

src/mcp_client/client.py:145–151  ·  view source on GitHub ↗

Enable tool-output replay: invoke() will not call the server; it will return recorded tool outputs from the provided trace jsonl in order.

(self, replay_trace_path: str)

Source from the content-addressed store, hash-verified

143 self._trace_path = str(trace_path)
144
145 def enable_replay(self, replay_trace_path: str) -> None:
146 """
147 Enable tool-output replay: invoke() will not call the server; it will return
148 recorded tool outputs from the provided trace jsonl in order.
149 """
150 self._replay_events = _read_jsonl(str(replay_trace_path))
151 self._replay_idx = 0
152
153 def _replay_next(self) -> Dict[str, Any]:
154 if not self._replay_events:

Callers 2

__init__Method · 0.95
runMethod · 0.80

Calls 1

_read_jsonlFunction · 0.85

Tested by

no test coverage detected