pub struct ToolAuditEntry {Show 18 fields
pub timestamp_unix_ms: u64,
pub session_id: String,
pub turn_id: String,
pub tool_call_id: String,
pub tool_name: String,
pub arguments_hash: String,
pub arguments_redacted: Option<Value>,
pub result_hash: String,
pub result_summary: Option<String>,
pub duration_ms: u64,
pub status: ToolAuditStatus,
pub sandbox_policy: Option<String>,
pub transport: Option<String>,
pub server_address: Option<String>,
pub server_port: Option<u16>,
pub model_id: Option<String>,
pub prompt_injection_flagged: bool,
pub reason: Option<String>,
}Expand description
One audit row written per tool invocation.
The shape mirrors what tracing already records for MCP tool calls
(mcp.tools.call span with provider / transport / server metadata) but adds
enough context for offline forensics.
Fields§
§timestamp_unix_ms: u64Unix epoch milliseconds when the entry was created.
session_id: StringStable identifier for the session (e.g. UUID).
turn_id: StringStable identifier for the turn within the session.
tool_call_id: StringProvider-side identifier for the tool call (matches tool_call_id).
tool_name: StringCanonical tool name (e.g. mcp::fetch::fetch, read_file).
arguments_hash: StringSHA-256 of the original (unredacted) tool arguments, hex-encoded.
arguments_redacted: Option<Value>Optional redacted snapshot of the arguments (secrets removed).
result_hash: StringSHA-256 of the tool result, hex-encoded.
result_summary: Option<String>Optional first N characters of the result for offline triage.
duration_ms: u64Wall-clock duration of the tool call in milliseconds.
status: ToolAuditStatusFinal status (success / failure / timeout / cancelled / blocked).
sandbox_policy: Option<String>Optional sandbox policy applied to this tool call (path to a JSON snapshot, or a short identifier).
transport: Option<String>MCP transport when applicable (stdio, streamable_http, …).
server_address: Option<String>Remote server address when applicable.
server_port: Option<u16>Remote server port when applicable.
model_id: Option<String>Identifier of the model that requested the call.
prompt_injection_flagged: boolTrue when the static is_suspicious_instruction probe flagged the
result content.
reason: Option<String>Optional free-form reason (e.g. loop_detector, circuit_breaker_open).
Trait Implementations§
Source§impl Clone for ToolAuditEntry
impl Clone for ToolAuditEntry
Source§fn clone(&self) -> ToolAuditEntry
fn clone(&self) -> ToolAuditEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more