Skip to content

Commit b318929

Browse files
committed
remove characters
1 parent 6c8011b commit b318929

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def add(a: int, b: int) -> int:
256256
def get_weather(city: str, unit: str = "celsius") -> str:
257257
"""Get weather for a city."""
258258
# This would normally call a weather API
259-
return f"Weather in {city}: 22°{unit[0].upper()}"
259+
return f"Weather in {city}: 22degrees{unit[0].upper()}"
260260
```
261261
_Full example: [examples/snippets/servers/basic_tool.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/basic_tool.py)_
262262
<!-- /snippet-source -->

examples/fastmcp/weather_structured.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def get_weather_alerts(region: str) -> list[WeatherAlert]:
9090
WeatherAlert(
9191
severity="high",
9292
title="Heat Wave Warning",
93-
description="Temperatures expected to exceed 40°C",
93+
description="Temperatures expected to exceed 40degreesC",
9494
affected_areas=["Los Angeles", "San Diego", "Riverside"],
9595
valid_until=datetime(2024, 7, 15, 18, 0),
9696
),

examples/snippets/servers/basic_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ def add(a: int, b: int) -> int:
1313
def get_weather(city: str, unit: str = "celsius") -> str:
1414
"""Get weather for a city."""
1515
# This would normally call a weather API
16-
return f"Weather in {city}: 22°{unit[0].upper()}"
16+
return f"Weather in {city}: 22degrees{unit[0].upper()}"

tests/server/fastmcp/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ async def test_basic_tools(server_transport: str, server_url: str) -> None:
249249
weather_result = await session.call_tool("get_weather", {"city": "London"})
250250
assert len(weather_result.content) == 1
251251
assert isinstance(weather_result.content[0], TextContent)
252-
assert "Weather in London: 22°C" in weather_result.content[0].text
252+
assert "Weather in London: 22degreesC" in weather_result.content[0].text
253253

254254

255255
# Test resources

0 commit comments

Comments
 (0)