pub struct WriteMemoryTopicTool { /* private fields */ }Expand description
WriteMemoryTopic — atomically write a topic file and update the
MEMORY.md index entry for it.
Implementations§
Source§impl WriteMemoryTopicTool
impl WriteMemoryTopicTool
Sourcepub fn new(loader: Arc<TopicLoader>) -> Self
pub fn new(loader: Arc<TopicLoader>) -> Self
Construct a WriteMemoryTopic tool backed by the given loader.
Trait Implementations§
Source§impl Debug for WriteMemoryTopicTool
impl Debug for WriteMemoryTopicTool
Source§impl Tool for WriteMemoryTopicTool
impl Tool for WriteMemoryTopicTool
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 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 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 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 WriteMemoryTopicTool
impl RefUnwindSafe for WriteMemoryTopicTool
impl Send for WriteMemoryTopicTool
impl Sync for WriteMemoryTopicTool
impl Unpin for WriteMemoryTopicTool
impl UnsafeUnpin for WriteMemoryTopicTool
impl UnwindSafe for WriteMemoryTopicTool
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