get_weather
Retrieve current weather data for any specified city to inform decisions and planning.
Instructions
it gets and retuns the weather of the city
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"city": "<city>"
},
"name": "get_weather"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | Yes |
Implementation Reference
- server.py:114-117 (handler)The core handler function for the 'get_weather' tool, registered via the @mcp.tool() decorator in FastMCP. It takes a 'city' parameter (str) and returns an integer (hardcoded to 45, dummy implementation). This captures both the execution logic and registration.
@mcp.tool() def get_weather(city: str) -> int: """it gets and retuns the weather of the city""" return 45