Tool Mocking

Domain: Tools & Function Calling

🎯 Motivation

For testing, replace real tools with fake (mock) versions that return predetermined results. Enables testing without real API calls.

πŸ“‹ Concrete Example

Mock get_weather: always returns β€˜28C sunny’ without calling the real API. Test the agent’s logic: does it suggest outdoor activities when sunny? Mock tools make testing fast and free.

πŸ”— Analogy

A flight simulator - you practice flying without leaving the ground. Mock tools let agents be tested without real API calls, costs, or risks.