diff --git a/crates/goose/src/agents/agent.rs b/crates/goose/src/agents/agent.rs index 15462c8a71ea..83ef54a32e00 100644 --- a/crates/goose/src/agents/agent.rs +++ b/crates/goose/src/agents/agent.rs @@ -289,11 +289,11 @@ impl Agent { async fn categorize_tools( &self, response: &Message, - _tools: &[rmcp::model::Tool], + tools: &[rmcp::model::Tool], ) -> ToolCategorizeResult { // Categorize tool requests let (frontend_requests, remaining_requests, filtered_response) = - self.categorize_tool_requests(response).await; + self.categorize_tool_requests(response, tools).await; ToolCategorizeResult { frontend_requests, diff --git a/crates/goose/src/agents/reply_parts.rs b/crates/goose/src/agents/reply_parts.rs index 5384f776a997..7c5d0c939d3f 100644 --- a/crates/goose/src/agents/reply_parts.rs +++ b/crates/goose/src/agents/reply_parts.rs @@ -270,9 +270,8 @@ impl Agent { pub(crate) async fn categorize_tool_requests( &self, response: &Message, + tools: &[Tool], ) -> (Vec, Vec, Message) { - let tools = self.list_tools(None).await; - // First collect all tool requests with coercion applied let tool_requests: Vec = response .content