Skip to main content

agent_runtime/tool/
tool.rs

1//! Executable tool contract implemented by integration crates.
2
3use super::ToolError;
4use crate::ToolContext;
5use async_trait::async_trait;
6use serde_json::Value;
7
8/// An executable tool.
9#[async_trait]
10pub trait Tool: Send + Sync {
11    async fn execute(&self, context: &ToolContext, arguments: Value) -> Result<String, ToolError>;
12}