Return mock population data for a country.
(country: str)
| 52 | |
| 53 | @tool(_description="Look up the population of a country") |
| 54 | def get_population(country: str) -> str: |
| 55 | """Return mock population data for a country.""" |
| 56 | populations = { |
| 57 | "bangladesh": "170 million", |
| 58 | "japan": "125 million", |
| 59 | "usa": "335 million", |
| 60 | "india": "1.4 billion", |
| 61 | } |
| 62 | return populations.get(country.lower(), f"Population data not available for {country}") |
| 63 | |
| 64 | |
| 65 | # ── Test runner ─────────────────────────────────────────────────────────────── |