Skip to content

Commit 7457804

Browse files
committed
replace chars
1 parent b318929 commit 7457804

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,12 +582,12 @@ async def book_table(
582582

583583
if result.action == "accept" and result.data:
584584
if result.data.checkAlternative:
585-
return f" Booked for {result.data.alternativeDate}"
586-
return " No booking made"
587-
return " Booking cancelled"
585+
return f"[SUCCESS] Booked for {result.data.alternativeDate}"
586+
return "[CANCELLED] No booking made"
587+
return "[CANCELLED] Booking cancelled"
588588

589589
# Date available
590-
return f" Booked for {date} at {time}"
590+
return f"[SUCCESS] Booked for {date} at {time}"
591591
```
592592
_Full example: [examples/snippets/servers/elicitation.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/elicitation.py)_
593593
<!-- /snippet-source -->

examples/snippets/servers/elicitation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ async def book_table(
3333

3434
if result.action == "accept" and result.data:
3535
if result.data.checkAlternative:
36-
return f" Booked for {result.data.alternativeDate}"
37-
return " No booking made"
38-
return " Booking cancelled"
36+
return f"[SUCCESS] Booked for {result.data.alternativeDate}"
37+
return "[CANCELLED] No booking made"
38+
return "[CANCELLED] Booking cancelled"
3939

4040
# Date available
41-
return f" Booked for {date} at {time}"
41+
return f"[SUCCESS] Booked for {date} at {time}"

tests/server/fastmcp/test_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ async def test_elicitation(server_transport: str, server_url: str) -> None:
459459
)
460460
assert len(booking_result.content) == 1
461461
assert isinstance(booking_result.content[0], TextContent)
462-
assert " Booked for 2024-12-26" in booking_result.content[0].text
462+
assert "[SUCCESS] Booked for 2024-12-26" in booking_result.content[0].text
463463

464464
# Test booking with available date (no elicitation)
465465
booking_result = await session.call_tool(
@@ -472,7 +472,7 @@ async def test_elicitation(server_transport: str, server_url: str) -> None:
472472
)
473473
assert len(booking_result.content) == 1
474474
assert isinstance(booking_result.content[0], TextContent)
475-
assert " Booked for 2024-12-20 at 20:00" in booking_result.content[0].text
475+
assert "[SUCCESS] Booked for 2024-12-20 at 20:00" in booking_result.content[0].text
476476

477477

478478
# Test notifications

0 commit comments

Comments
 (0)