LLM APIs and Tool Calling

What model APIs provide

Tool calling concept

Model converts user intent into a structured function call (JSON arguments), then app executes the function and returns result back to model.

  1. User asks a question.
  2. Model selects tool and fills arguments.
  3. App executes tool (DB/API/calculation).
  4. Result is fed back for final natural-language answer.

Why tool calling matters

Basic schema pattern

{
  "name": "get_weather",
  "parameters": {
    "type": "object",
    "properties": { "location": { "type": "string" } },
    "required": ["location"]
  }
}