← Back to Glossary
Tool Calling & Selection
Phase 04 · Agentstechnique

The process where an LLM selects an available tool and outputs a structured request (JSON) to run external code instead of plain text.

Why it exists

LLMs cannot perform math, search live web data, or execute code natively. Tool calling lets models delegate actions to APIs.

How it works

System passes tool schemas -> LLM evaluates prompt -> Model outputs JSON string { 'name': 'search', 'args': {'query': 'X'} } -> App executes function.