# `Mojentic.LLM.Tools.CurrentDatetime`
[🔗](https://github.com/svetzal/mojentic-ex/blob/v1.2.0/lib/mojentic/llm/tools/current_datetime.ex#L1)

Tool for getting the current date and time.

This tool returns the current datetime with optional formatting.
It's useful when the LLM needs to know the current time or date.

## Examples

    alias Mojentic.LLM.Tools.CurrentDatetime

    tool = CurrentDatetime.new()
    {:ok, result} = CurrentDatetime.run(tool, %{})
    # => {:ok, %{current_datetime: "2025-11-15 14:30:00", timestamp: 1700060400, timezone: "UTC"}}

    {:ok, result} = CurrentDatetime.run(tool, %{"format_string" => "%Y-%m-%d"})
    # => {:ok, %{current_datetime: "2025-11-15", timestamp: 1700060400, timezone: "UTC"}}

# `new`

Creates a new CurrentDatetime tool instance.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
