pub struct ToolContext {
pub tool_call_id: String,
pub messages: Vec<Message>,
}Expand description
Context information provided to tools during execution.
This structure contains metadata and conversation history that tools may need during execution. It provides tools with access to the tool call identifier and the full conversation context that led to the tool invocation.
Fields§
§tool_call_id: StringUnique identifier for the tool call being executed. This ID is used to correlate tool results back to the original invocation.
messages: Vec<Message>Conversation messages leading up to this tool call. Includes all previous user, assistant, and tool result messages that provide context for the current execution.
Auto Trait Implementations§
impl Freeze for ToolContext
impl RefUnwindSafe for ToolContext
impl Send for ToolContext
impl Sync for ToolContext
impl Unpin for ToolContext
impl UnwindSafe for ToolContext
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