pub enum ToolCallPayload {
FileRead {
name: String,
arguments: FileReadArgs,
provider_call_id: Option<String>,
},
FileEdit {
name: String,
arguments: FileEditArgs,
provider_call_id: Option<String>,
},
FileWrite {
name: String,
arguments: FileWriteArgs,
provider_call_id: Option<String>,
},
Execute {
name: String,
arguments: ExecuteArgs,
provider_call_id: Option<String>,
},
Search {
name: String,
arguments: SearchArgs,
provider_call_id: Option<String>,
},
Mcp {
name: String,
arguments: McpArgs,
provider_call_id: Option<String>,
},
Generic {
name: String,
arguments: Value,
provider_call_id: Option<String>,
},
}Expand description
Normalized tool call with structured arguments
This enum provides type-safe access to common tool call patterns while maintaining compatibility with the original JSON structure.
Variants§
FileRead
File read operation (Read, Glob, etc.)
FileEdit
File edit operation (Edit)
FileWrite
File write operation (Write)
Execute
Execute/shell command (Bash, etc.)
Search
Search operation (Grep, WebSearch, etc.)
Mcp
MCP (Model Context Protocol) tool call
Generic
Generic/fallback for unknown or custom tools
Implementations§
Trait Implementations§
Source§impl Clone for ToolCallPayload
impl Clone for ToolCallPayload
Source§fn clone(&self) -> ToolCallPayload
fn clone(&self) -> ToolCallPayload
Returns a duplicate of the value. Read more
1.0.0 · 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 ToolCallPayload
impl Debug for ToolCallPayload
Source§impl<'de> Deserialize<'de> for ToolCallPayload
impl<'de> Deserialize<'de> for ToolCallPayload
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 ToolCallPayload
impl RefUnwindSafe for ToolCallPayload
impl Send for ToolCallPayload
impl Sync for ToolCallPayload
impl Unpin for ToolCallPayload
impl UnwindSafe for ToolCallPayload
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