Toolkit.UtcTime

Tool list to initialize the client

tools = [utc_now.tool]

Tool handler map is passed to Tools.handle_tool_calls!

tool_handler_map = Dict.from_list([(utc_now.name, utc_now.handler)]) client = Client.new { apiKey, model: "tool-capable/model", tools } #... messages = Chat.add_user_message(client, newMessage, {}) response = Http.send!(Chat.build_http_request(client, {}))? with_tool_results = Chat.update_messages(response, messages)? |> Tools.handle_tool_calls!(client toolHandlerMap, { max_model_calls: 5 })

utc_now : { name : Str, handler! : Str => Result Str , tool : Tool }

Expose name, handler and tool for utcNow.

This tool allows the model to get the current UTC time as an ISO 8601 string.