Files
zesdex/apps/infrastructure/src/subagent/tools.rs
T

20 lines
491 B
Rust
Raw Normal View History

//! Subagent tool helpers — wrap tool execution for subagent use.
use anyhow::Result;
use tracing::instrument;
use crate::tools::{Tool, ToolCtx};
/// Execute a single tool call within a subagent context.
///
/// Delegates directly to the tool's `run` method with the given context and
/// JSON arguments.
#[instrument(skip(tool, ctx, args))]
pub fn execute_tool_call(
tool: &dyn Tool,
ctx: &ToolCtx,
args: &serde_json::Value,
) -> Result<String> {
tool.run(ctx, args)
}