Show MCP tool calls distinctly in the terminal and the run viewer

This commit is contained in:
Jonathan Singer
2026-08-21 13:09:24 -04:00
parent afda373f55
commit 01ea94920d
21 changed files with 566 additions and 177 deletions
+12
View File
@@ -388,6 +388,18 @@ class ReportState:
posthog.end(self, exit_reason="finished_by_tool")
scarf.end(self, exit_reason="finished_by_tool")
def record_mcp_connections(self, names: list[str]) -> None:
"""Note the MCP servers this run connected, and persist it.
Saved as soon as the run connects rather than at the end, so an interface
reading the record mid-run can already attribute a tool call to the
server it went out to.
"""
if self.run_record.get("mcp_connections") == names:
return
self.run_record["mcp_connections"] = names
self.save_run_data()
def set_scan_config(self, config: dict[str, Any]) -> None:
self.scan_config = config
self.run_record["status"] = "running"