trace_save
Save AI agent interaction traces to disk for audit trails, creating JSON and Markdown files to document safety monitoring activities.
Instructions
Save the current trace to disk as JSON and Markdown files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/agent_safety_mcp/server.py:338-349 (handler)Implementation of the trace_save tool which saves the current tracer trace to JSON and Markdown files and returns a summary.
@mcp.tool() def trace_save() -> dict: """Save the current trace to disk as JSON and Markdown files.""" tracer = _get_tracer() json_path = tracer.save() md_path = tracer.save_markdown() return { "saved": True, "json": str(json_path), "markdown": str(md_path), "summary": tracer.summary(), }