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:
@@ -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")
|
||||
|
||||
|
||||
|
||||
@@ -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"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user