Converts to a JSON object for the Ollama API tools array.
The function definition.
Tool type; currently always "function".
auto schema = parseJSON(`{ "type": "object", "properties": {"location": {"type": "string"}}, "required": ["location"] }`); auto tool = Tool("function", ToolFunction("get_weather", "Get current weather", schema)); auto resp = client.chat("llama3", messages, JSONValue.init, false, [tool]);
A tool (function) definition passed to chat() to enable tool/function calling.