pub struct UpdatePlanTool { /* private fields */ }Expand description
A lightweight tool that records and displays a plan checklist to the user.
§Behavior
- Validates the incoming
UpdatePlanArgs(non-empty plan, at most onein_progressstep, no empty step text). - Broadcasts a
RuntimeEvent::PlanUpdatedevent for UI rendering. - Returns a short summary — it does NOT store, execute, or drive the plan.
This is a display-only protocol, inspired by Codex’s update_plan.
Implementations§
Source§impl UpdatePlanTool
impl UpdatePlanTool
pub fn new() -> Self
Sourcepub fn with_description(self, desc: String) -> Self
pub fn with_description(self, desc: String) -> Self
Override the tool description with a custom string.
The default description is written for the generic agent-base framework. Consumers like ops-agent can use this to inject domain-specific usage guidelines (e.g. step granularity rules, when to use/not use plans).
Trait Implementations§
Source§impl Default for UpdatePlanTool
impl Default for UpdatePlanTool
Source§impl Tool for UpdatePlanTool
impl Tool for UpdatePlanTool
fn name(&self) -> &'static str
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Human-readable description of what this tool does and when to use it.
Source§fn schema(&self) -> Value
fn schema(&self) -> Value
JSON Schema for the tool’s input arguments (MCP
inputSchema shape,
without the provider envelope).Source§fn metadata(&self) -> ToolMetadata
fn metadata(&self) -> ToolMetadata
Machine-readable metadata for tool introspection. Read more
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: &'life1 Value,
ctx: &'life2 ToolContext,
) -> Pin<Box<dyn Future<Output = AgentResult<Vec<Content>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl !Freeze for UpdatePlanTool
impl RefUnwindSafe for UpdatePlanTool
impl Send for UpdatePlanTool
impl Sync for UpdatePlanTool
impl Unpin for UpdatePlanTool
impl UnsafeUnpin for UpdatePlanTool
impl UnwindSafe for UpdatePlanTool
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