privacy_selftest
Run a local privacy self-test on an AI agent trace; get a JSON verdict with findings and concrete fixes, then rerun until it passes.
Instructions
Test YOURSELF for privacy leaks and get one JSON document back: passed, verdict, risk_index, per-channel status, redacted findings with fingerprints, ordered next_steps with concrete fix objects, delta versus your previous self-test, and the exact rerun. Call it with the trace of a run you just made (inline trace, a trace_path, or coding-agent steps), fix next_steps[0], then call it again until passed is true. passed=true means no finding from the detection tiers listed, not that you are safe or compliant. Runs locally; nothing is sent anywhere.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "privacy_selftest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | No | Recorded action/observation steps of a coding or computer-use agent: [{"action": "write_file", "path": ..., "content": ...}, {"action": "run", "command": ..., "observation": ...}, {"action": "finish", "content": ...}]. | |
| trace | No | The run to score, inline. Any of: an AgentLeak trace {"events": [...]}; a list of AgentLeak events; OpenAI chat messages; OpenAI Responses / Agents SDK items (result.to_input_list()); Claude Code transcript records (list of JSONL objects); OTLP JSON spans ({"resourceSpans": ...}) using OpenTelemetry GenAI or OpenInference attributes. The format is detected and reported. | |
| fail_on | No | Fail when a finding is at or above this level: L1, L2, L3 (default) or L4. | L3 |
| code_path | No | Also statically scan this source path (inside the server root). | |
| trace_path | No | Path to a trace file or a directory of .json/.jsonl traces, inside the server root. Use instead of `trace`. | |
| trace_format | No | Skip detection: agentleak_trace, agentleak_events, openai_chat, openai_responses, claude_code, otel_genai, otel_openinference, agent_steps. | |
| record_history | No | Record this result locally so the next call reports `delta` (new / fixed findings). | |
| scenario_instance | No | instance_id from privacy_get_scenario, to match that scenario's planted canaries exactly. Defaults to the trace's scenario_id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||