pub struct ToolCall {
pub id: String,
pub session_id: String,
pub timestamp: DateTime<Utc>,
pub tool_name: String,
pub input: Value,
pub duration_ms: Option<u64>,
pub output: Option<String>,
}Expand description
A tool call extracted from a session JSONL file
Combines tool_use (from assistant messages) with tool_result (from user messages) to compute duration and capture output.
Fields§
§id: StringTool call ID (from tool_use block)
session_id: StringSession this tool call belongs to
timestamp: DateTime<Utc>Timestamp when the tool was called (from assistant message)
tool_name: StringTool name (e.g., “Read”, “Bash”, “WebFetch”, “mcp__server__tool”)
input: ValueInput parameters as JSON
duration_ms: Option<u64>Duration from call to result in milliseconds (None if no result found)
output: Option<String>Tool output content (from tool_result block, truncated preview)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolCall
impl<'de> Deserialize<'de> for ToolCall
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ToolCall
impl RefUnwindSafe for ToolCall
impl Send for ToolCall
impl Sync for ToolCall
impl Unpin for ToolCall
impl UnsafeUnpin for ToolCall
impl UnwindSafe for ToolCall
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more