pub struct ToolEntry {
pub schema: ToolSchema,
pub permission: ToolPermission,
pub source: ToolSource,
pub side_effects: bool,
pub category: Option<String>,
}Expand description
A complete tool definition — canonical identity for a tool.
Fields§
§schema: ToolSchemaThe tool schema (name, description, parameters, etc.).
permission: ToolPermissionDefault permission classification.
source: ToolSourceWhere the tool comes from.
side_effects: boolWhether the tool modifies external state (for safety classification).
category: Option<String>Human-readable category for grouping (e.g., “filesystem”, “network”, “memory”).
Implementations§
Source§impl ToolEntry
impl ToolEntry
pub fn new(schema: ToolSchema) -> Self
pub fn builtin(schema: ToolSchema) -> Self
pub fn with_permission(self, perm: ToolPermission) -> Self
pub fn with_source(self, source: ToolSource) -> Self
pub fn with_side_effects(self, side_effects: bool) -> Self
pub fn with_category(self, category: &str) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolEntry
impl RefUnwindSafe for ToolEntry
impl Send for ToolEntry
impl Sync for ToolEntry
impl Unpin for ToolEntry
impl UnsafeUnpin for ToolEntry
impl UnwindSafe for ToolEntry
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