pub struct ReadMemoryTopicTool { /* private fields */ }Expand description
ReadMemoryTopic — read a topic file by slug. Sandboxed to the loader’s
memory directory.
Implementations§
Source§impl ReadMemoryTopicTool
impl ReadMemoryTopicTool
Sourcepub fn new(loader: Arc<TopicLoader>) -> Self
pub fn new(loader: Arc<TopicLoader>) -> Self
Construct a ReadMemoryTopic tool backed by the given loader.
Trait Implementations§
Source§impl Debug for ReadMemoryTopicTool
impl Debug for ReadMemoryTopicTool
Source§impl Tool for ReadMemoryTopicTool
impl Tool for ReadMemoryTopicTool
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Stable, unique-within-registry name. Must match the model’s
expected tool name in the system prompt or schema.
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Description sent to the model.
Source§fn input_schema(&self) -> &Value
fn input_schema(&self) -> &Value
JSON Schema for the input. Returned by reference to avoid cloning
per request.
Source§fn invoke<'life0, 'async_trait>(
&'life0 self,
input: Value,
_cx: ToolContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<ContentBlock>, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke<'life0, 'async_trait>(
&'life0 self,
input: Value,
_cx: ToolContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<ContentBlock>, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool. Returns the content blocks to splice into the
ToolResult message. Read moreSource§fn parallel_conflict_key(&self, _input: &Value) -> Option<String>
fn parallel_conflict_key(&self, _input: &Value) -> Option<String>
Returns
Some(key) when this tool call has a conflict identity that
must not run in parallel with another call sharing the same key.
Returns None (the default) when the tool is fully parallel-safe. Read moreSource§fn is_read_only(&self) -> bool
fn is_read_only(&self) -> bool
Whether this tool is side-effect-free — it only reads state (or injects
context) and never mutates the workspace or the outside world. Read more
Source§fn mutates_files(&self) -> bool
fn mutates_files(&self) -> bool
Whether a successful call mutates files in the workspace. Read more
Source§fn as_any(&self) -> Option<&(dyn Any + 'static)>
fn as_any(&self) -> Option<&(dyn Any + 'static)>
Optional downcast hook for recovering a tool’s concrete type at
runtime. The default returns
None; tools that expose extra
session metadata beyond the trait (e.g. the Skill tool surfacing
its loaded skill names) override it to return Some(self).Auto Trait Implementations§
impl !Freeze for ReadMemoryTopicTool
impl RefUnwindSafe for ReadMemoryTopicTool
impl Send for ReadMemoryTopicTool
impl Sync for ReadMemoryTopicTool
impl Unpin for ReadMemoryTopicTool
impl UnsafeUnpin for ReadMemoryTopicTool
impl UnwindSafe for ReadMemoryTopicTool
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