pub struct Tool {
pub name: String,
pub executable: PathBuf,
pub default_args: Vec<String>,
pub description: String,
}Expand description
A registered external tool.
Tools are registered with their executable path, default arguments, and description. When invoked, default arguments are combined with invocation-specific arguments.
Fields§
§name: StringTool identifier (e.g., “magellan”, “cargo”, “splice”)
executable: PathBufPath to the executable
default_args: Vec<String>Default arguments passed to every invocation
description: StringHuman-readable description of the tool
Implementations§
Source§impl Tool
impl Tool
Sourcepub fn default_args(self, args: Vec<String>) -> Self
pub fn default_args(self, args: Vec<String>) -> Self
Sets the default arguments for the tool.
§Arguments
args- Vector of default argument strings
§Returns
Self for builder pattern chaining
§Example
use forge_agent::workflow::tools::Tool;
let tool = Tool::new("magellan", "/usr/bin/magellan")
.default_args(vec!["--db".to_string(), ".forge/graph.db".to_string()]);Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tool
impl<'de> Deserialize<'de> for Tool
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
impl StructuralPartialEq for Tool
Auto Trait Implementations§
impl Freeze for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnsafeUnpin for Tool
impl UnwindSafe for Tool
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more