fix: address PR #574 fourth review round

- Use lowercase generics (list[...]) in new deck response models
- Add clarifying comment on AddressBook.uri slug semantics
- Fall back calendar_display_name to calendar_name when absent

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-02-21 09:36:14 +01:00
parent f51b27ba19
commit 18e5baf2a5
4 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -264,14 +264,14 @@ class CreateLabelResponse(BaseResponse):
class ListCardsResponse(BaseResponse):
"""Response model for listing deck cards."""
cards: List[DeckCard] = Field(description="List of deck cards")
cards: list[DeckCard] = Field(description="List of deck cards")
total: int = Field(description="Total number of cards")
class ListLabelsResponse(BaseResponse):
"""Response model for listing deck labels."""
labels: List[DeckLabel] = Field(description="List of deck labels")
labels: list[DeckLabel] = Field(description="List of deck labels")
total: int = Field(description="Total number of labels")
+2 -1
View File
@@ -44,7 +44,8 @@ def _event_dict_to_summary(event: dict) -> CalendarEventSummary:
categories=categories,
status=event.get("status"),
calendar_name=event.get("calendar_name"),
calendar_display_name=event.get("calendar_display_name"),
calendar_display_name=event.get("calendar_display_name")
or event.get("calendar_name"),
)
+2
View File
@@ -66,6 +66,8 @@ def configure_contacts_tools(mcp: FastMCP):
addressbooks_data = await client.contacts.list_addressbooks()
addressbooks = [
AddressBook(
# ab["name"] is a short slug like "contacts", not a full CardDAV URI;
# all tools use it as a path segment: f"{carddav_path}/{name}/"
uri=ab["name"],
displayname=ab.get("display_name", ab["name"]),
ctag=ab.get("getctag"),