pub struct PlanTool;Expand description
Submit a structured implementation plan.
The plan is stored in ctx.custom["plan"] for retrieval after the loop completes.
Signals done — the planning phase is complete.
Expected args:
{
"summary": "Add user authentication",
"steps": [
{ "description": "Create auth module", "files": ["src/auth.rs"], "tool_hints": ["write_file"] },
{ "description": "Add tests", "files": ["tests/auth.rs"] }
]
}Trait Implementations§
Source§impl Tool for PlanTool
impl Tool for PlanTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable description shown to the LLM.
Source§fn is_system(&self) -> bool
fn is_system(&self) -> bool
System tools are always visible (not subject to progressive discovery).
Source§fn parameters_schema(&self) -> Value
fn parameters_schema(&self) -> Value
JSON Schema for the tool’s parameters (generated via
json_schema_for::<Args>()).fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 mut AgentContext,
) -> Pin<Box<dyn Future<Output = Result<ToolOutput, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn is_read_only(&self) -> bool
fn is_read_only(&self) -> bool
Read-only tools can execute in parallel via
execute_readonly.Source§fn execute_readonly<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 AgentContext,
) -> Pin<Box<dyn Future<Output = Result<ToolOutput, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn execute_readonly<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 AgentContext,
) -> Pin<Box<dyn Future<Output = Result<ToolOutput, ToolError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Execute without mutable context (for parallel read-only dispatch).
Default: delegates to
execute with a cloned context. Override for true
read-only tools to avoid the clone.fn to_def(&self) -> ToolDef
Auto Trait Implementations§
impl Freeze for PlanTool
impl RefUnwindSafe for PlanTool
impl Send for PlanTool
impl Sync for PlanTool
impl Unpin for PlanTool
impl UnsafeUnpin for PlanTool
impl UnwindSafe for PlanTool
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