MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / get_capital

Function get_capital

tests/iterative_agent_tests/test_helpers.py:41–50  ·  view source on GitHub ↗

Return the capital city of a country.

(country: str)

Source from the content-addressed store, hash-verified

39
40@tool(_description="Look up the capital city of a country")
41def get_capital(country: str) -> str:
42 """Return the capital city of a country."""
43 capitals = {
44 "bangladesh": "Dhaka",
45 "japan": "Tokyo",
46 "usa": "Washington D.C.",
47 "india": "New Delhi",
48 "uk": "London",
49 }
50 return capitals.get(country.lower(), f"Capital not found for {country}")
51
52
53@tool(_description="Look up the population of a country")

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected