#[non_exhaustive]pub enum ToolCallContext {
WebSearch {
query: String,
engine: Option<String>,
},
PageVisit {
url: String,
reason: Option<VisitReason>,
page_title: Option<String>,
page_status: Option<u16>,
page_bytes: Option<u64>,
page_duration_ms: Option<u64>,
navigation_error: Option<String>,
screenshot: Option<ScreenshotMeta>,
},
DataExtraction {
target: String,
url: Option<String>,
result_count: Option<usize>,
page_status: Option<u16>,
page_duration_ms: Option<u64>,
},
SessionAction {
action: String,
url: Option<String>,
},
ScriptStep {
current: usize,
total: usize,
step: String,
},
}Expand description
Stable since 0.63.0
Semantic context for a tool execution event.
Carries structured information about what a tool call means, derived from the tool name and arguments by the agent loop. UI consumers that understand a context variant can render it richly; older consumers simply ignore the field.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WebSearch
A search engine query.
Fields
PageVisit
Visiting a web page.
Fields
§
reason: Option<VisitReason>Why this page is being visited.
Navigation error message (from BrowseProgress::NavigationFailed).
§
screenshot: Option<ScreenshotMeta>Screenshot metadata (from BrowseProgress::ScreenshotCaptured).
DataExtraction
Extracting data from a web page.
Fields
SessionAction
An action within a persistent browser session.
Fields
ScriptStep
A step within a browse script.
Trait Implementations§
Source§impl Clone for ToolCallContext
impl Clone for ToolCallContext
Source§fn clone(&self) -> ToolCallContext
fn clone(&self) -> ToolCallContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolCallContext
impl Debug for ToolCallContext
Source§impl<'de> Deserialize<'de> for ToolCallContext
impl<'de> Deserialize<'de> for ToolCallContext
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolCallContext, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolCallContext, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ToolCallContext
impl Serialize for ToolCallContext
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ToolCallContext
impl RefUnwindSafe for ToolCallContext
impl Send for ToolCallContext
impl Sync for ToolCallContext
impl Unpin for ToolCallContext
impl UnsafeUnpin for ToolCallContext
impl UnwindSafe for ToolCallContext
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