Tool Definition

Domain: Tools & Function Calling

🎯 Motivation

Before an agent can use a tool, you must define it: name, description, parameters, and return type. The model uses this to decide when and how to call it.

πŸ“‹ Concrete Example

Define: get_weather(city: str, unit: str=C) -> str. Description: β€˜Get current weather for a city.’ The model sees this definition and knows it can check weather.

πŸ”— Analogy

A tool catalog in a workshop - each tool has a label: β€˜Hammer - for driving nails. Input: nail + surface. Output: nail driven in.’ The catalog tells workers what each tool does and how to use it.