Tools extend what agents can do beyond text generation.
How it works:
Define tool schemas (name, description, parameters)
LLM decides which tool to call and with what arguments
You execute the tool and return results
LLM incorporates results into response
Common tools:
- Web search, code execution, file operations
- Database queries, API calls, calculators
Interview question: "How do you handle tool errors?"
Return error message to LLM. Let it retry or try alternative approach. Set max retries.