pub struct RegisteredTool {
pub tool: Arc<dyn Tool>,
pub snippet: Option<String>,
pub guidelines: Vec<String>,
pub exposure: Exposure,
pub namespace: Option<Namespace>,
pub default_active: bool,
pub annotations: Option<Value>,
pub source: Option<SourceInfo>,
}Expand description
A tool as registered with a session: the tool, the text it adds to the system prompt, and how it reaches the model.
Fields§
§tool: Arc<dyn Tool>The tool.
snippet: Option<String>One-line summary for the prompt’s tool list, which leaves out tools without one.
guidelines: Vec<String>Bullets added to the prompt’s rules.
exposure: ExposureHow it reaches the model.
namespace: Option<Namespace>Its group.
default_active: boolWhether registering it activates it, when its exposure is declarable.
annotations: Option<Value>pi’s ToolAnnotations, such as readOnlyHint.
source: Option<SourceInfo>The extension that registered it, or None for a built-in tool.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RegisteredTool
impl !UnwindSafe for RegisteredTool
impl Forget for RegisteredTool
impl Freeze for RegisteredTool
impl Send for RegisteredTool
impl Sync for RegisteredTool
impl Unpin for RegisteredTool
impl UnsafeUnpin for RegisteredTool
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