Tool calling

Also: function calling, tool use

The application describes available tools with a name, description and JSON Schema; the model may reply with a tool call (function name plus JSON arguments) instead of prose. The runtime validates and runs it and returns the result for the model's next turn.

Example

Given a get_weather(city) schema and the question "What's the weather in Paris?", the model emits {"name": "get_weather", "arguments": {"city": "Paris"}}; the app calls the weather API and sends back the temperature, which the model turns into a sentence.

See it in the lesson: Tool Calling & Function Calling →

Related terms

More in Retrieval, RAG & Agents