14 lines
327 B
Rust
14 lines
327 B
Rust
//! Subagent tool helpers — wrap tool execution for subagent use.
|
|||
|
|
|
||
|
|
use crate::tools::{Tool, ToolCtx};
|
||
|
|
use anyhow::Result;
|
||
|
|
|
||
|
|
/// Execute a single tool call within a subagent context.
|
||
|
|
pub fn execute_tool_call(
|
||
|
|
tool: &dyn Tool,
|
||
|
|
ctx: &ToolCtx,
|
||
|
|
args: &serde_json::Value,
|
||
|
|
) -> Result<String> {
|
||
|
|
tool.run(ctx, args)
|
||
|
|
}
|