Tool calls (sometimes called function calls) let Anannas-powered models suggest calling an external function.The model itself does not directly execute the tool. Instead:
The model proposes a tool call.
Your system executes the tool locally.
You return the toolβs output back into the conversation.
The model uses it to generate a final answer.
Anannas standardizes this interface across OpenAI, Anthropic, and other providers - so you can implement once and support multiple LLMs.Supported Models: You can discover tool-enabled models by checking /v1/models or filtering by supported_parameters=tools.
def calculator(operation, a, b): if operation == "multiply": return a * btool_result = calculator("multiply", 25, 17) # -> 425
Step 3: Inference Request with Tool ResultsYou send the tool results back into the conversation as a "role": "tool" message:
Copy
{ "model": "openai/gpt-3.5-turbo", "messages": [ { "role": "user", "content": "What is the weather in NYC?" }, { "role": "assistant", "content": "I'll check the weather in New York City for you.", "tool_calls": [ { "id": "call_123", "type": "function", "function": { "name": "get_weather", "arguments": "{\"location\": \"New York City\"}" } } ] }, { "role": "tool", "content": "72Β°F, sunny", "tool_call_id": "call_123" } ], "tools": [ { "type": "function", "function": { "name": "get_weather", "description": "Get the current weather in a location", "parameters": { "type": "object", "properties": { "location": {"type": "string"}, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]} }, "required": ["location"] } } } ]}
With this flow, Anannas ensures consistent tool calling across all supported providers.
You can now build agentic loops, multi-turn conversations, and more.