From c59f6bfa614ae2e5652b4b425078244962044031 Mon Sep 17 00:00:00 2001 From: narawat Date: Fri, 21 Aug 2026 07:13:52 +0700 Subject: [PATCH] update --- src/agentCore.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/agentCore.jl b/src/agentCore.jl index ab0d5f4..4048e46 100644 --- a/src/agentCore.jl +++ b/src/agentCore.jl @@ -994,7 +994,10 @@ function prepareToolCall( agentEventSink )::Union{preparedToolCall,immediateOutcome} agentEventSink("prepareToolCall 1") - tool = get(context.tools, toolCall.name, nothing) # pick a called tool from tool store + + # pick a called tool from tool store + tool = get(context.tools, toolCall.name, nothing) + if tool === nothing agentEventSink("prepareToolCall 2") return immediateOutcome(createErrorToolResult("Tool $toolCall.name not found"), true)