handle_tool_call

Function handle_tool_call 

Source
async fn handle_tool_call(
    __arg0: State<(AppState, (Arc<ToolRegistry>, Arc<AgentRegistry>))>,
    __arg1: Path<String>,
    __arg2: Json<Value>,
) -> Result<Json<Value>, AppError>
Expand description

Handler for POST /tools/{name}.

Unified tool dispatch. Looks up the tool by name in the registry (checking the main registry first, then extras), validates parameters, and executes it.

Returns 404 if the tool is not found, 400 for parameter validation errors, 408 for timeout, and 500 for execution errors.