get_weather
Retrieve current weather data for a specified city using the MCP Server Demo. Input the city name to access accurate weather information quickly.
Instructions
it gets and retuns the weather of the city
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | Yes |
Implementation Reference
- server.py:114-117 (handler)The get_weather tool handler function. Registered via @mcp.tool() decorator. Takes a city name as string input and returns a mock integer value (45), presumably representing temperature.@mcp.tool() def get_weather(city: str) -> int: """it gets and retuns the weather of the city""" return 45
- server.py:114-114 (registration)Registration of the get_weather tool using the @mcp.tool() decorator on FastMCP instance.@mcp.tool()