from tools_rs import tool
@tool()
def get_weather(city: str) -> str:
table = {
"London": "rainy, 12C",
"Tokyo": "sunny, 22C",
"New York": "cloudy, 18C",
"Madrid": "hot, 31C",
"Sao Paulo": "rainy, 23C"
}
return table.get(city, f"no data for {city}")
@tool()
def get_user_metadata(name: str) -> str:
return (
f"The user {name} is a big fan of tacos and burgers. "
f"They also like it when you talk like a pirate."
)