pub struct ToolCallAction {
pub tool_name: String,
pub tool_path: String,
pub parameters: ParameterBindings,
pub timeout_ms: Option<u64>,
}Expand description
Tool call action configuration
Calls a ricecoder tool with parameters bound from the event context. The tool path can be an absolute path, relative path, or internal handler reference.
§Examples
ⓘ
ToolCallAction {
tool_name: "code_formatter".to_string(),
tool_path: "/usr/local/bin/prettier".to_string(),
parameters: ParameterBindings {
bindings: vec![
("file_path".to_string(), ParameterValue::Variable("file_path".to_string())),
("format".to_string(), ParameterValue::Literal(json!("json"))),
].into_iter().collect(),
},
timeout_ms: Some(5000),
}Fields§
§tool_name: StringName of the tool
tool_path: StringPath to the tool (absolute, relative, or internal handler)
parameters: ParameterBindingsParameter bindings from event context
timeout_ms: Option<u64>Optional timeout in milliseconds
Trait Implementations§
Source§impl Clone for ToolCallAction
impl Clone for ToolCallAction
Source§fn clone(&self) -> ToolCallAction
fn clone(&self) -> ToolCallAction
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 ToolCallAction
impl Debug for ToolCallAction
Source§impl<'de> Deserialize<'de> for ToolCallAction
impl<'de> Deserialize<'de> for ToolCallAction
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 ToolCallAction
impl RefUnwindSafe for ToolCallAction
impl Send for ToolCallAction
impl Sync for ToolCallAction
impl Unpin for ToolCallAction
impl UnwindSafe for ToolCallAction
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