pub async fn call_tool_by_name(
collection: &ToolCollection,
name: &str,
arguments: Value,
) -> Result<FunctionResponse, ToolError>Expand description
Call a tool by name with JSON arguments on a given collection.
ยงExample
use tools_rs::{collect_tools, call_tool_by_name};
use serde_json::json;
let tools = collect_tools();
let result = call_tool_by_name(&tools, "add", json!([1, 2])).await?;