A function, with a contract
Tool calling begins in V2. A C# handler advertises its name, description and JSON parameter schema. The model can request that named function with structured arguments. The application validates the response shape, looks up a registered handler, executes it, and sends a tool result back to the model.
A reply that merely says it checked the clock is not proof. The current-time demonstration verifies an actual tool message and the returned timestamp, then reloads the saved exchange. That evidence matters more than confident wording in the final answer.
One loop, two protocols
Ollama and LM Studio have distinct wire formats. In the current adapters, Ollama sends object arguments and named tool results; the OpenAI-compatible LM Studio adapter sends function-argument JSON strings and correlates results with call IDs. Lilith keeps those details in the provider adapters.
Try the clock
What is the current date and time?
Use your time tool and include the time zone.The handler accepts an empty object and returns local and UTC timestamps. Read the numeric offset: a Windows time-zone identifier containing Standard Time can still refer to a region currently observing summer time.
Make your own tool
Copy ToolTemplate, choose a unique function name, advertise the inputs, and implement an async handler. Validate arguments inside the handler, not just in the schema. Register it before boot and honour cancellation when performing I/O. The example echo tool is deliberately disabled until registered.
Know the boundary
Tool loops and deadlines limit ordinary mistakes, but a registered handler is application code. An in-process function that ignores cancellation cannot be forcibly stopped safely by a cancellation token. Keep side effects deliberate and inspect results before claiming success.