@@ -20,7 +20,7 @@ class WeatherData(BaseModel):
2020
2121
2222@mcp .tool ()
23- def get_weather (city : str ) -> WeatherData :
23+ def get_weather (_city : str ) -> WeatherData :
2424 """Get weather for a city - returns structured data."""
2525 # Simulated weather data
2626 return WeatherData (
@@ -39,14 +39,14 @@ class LocationInfo(TypedDict):
3939
4040
4141@mcp .tool ()
42- def get_location (address : str ) -> LocationInfo :
42+ def get_location (_address : str ) -> LocationInfo :
4343 """Get location coordinates"""
4444 return LocationInfo (latitude = 51.5074 , longitude = - 0.1278 , name = "London, UK" )
4545
4646
4747# Using dict[str, Any] for flexible schemas
4848@mcp .tool ()
49- def get_statistics (data_type : str ) -> dict [str , float ]:
49+ def get_statistics (_data_type : str ) -> dict [str , float ]:
5050 """Get various statistics"""
5151 return {"mean" : 42.5 , "median" : 40.0 , "std_dev" : 5.2 }
5252
@@ -64,7 +64,7 @@ def __init__(self, name: str, age: int, email: str | None = None):
6464
6565
6666@mcp .tool ()
67- def get_user (user_id : str ) -> UserProfile :
67+ def get_user (_user_id : str ) -> UserProfile :
6868 """Get user profile - returns structured data"""
6969 return UserProfile (name = "Alice" , age = 30 , email = "alice@example.com" )
7070
@@ -91,7 +91,7 @@ def list_cities() -> list[str]:
9191
9292
9393@mcp .tool ()
94- def get_temperature (city : str ) -> float :
94+ def get_temperature (_city : str ) -> float :
9595 """Get temperature as a simple float"""
9696 return 22.5
9797 # Returns: {"result": 22.5}
0 commit comments