Add ICS calendar support
All checks were successful
Build And Test / publish (push) Successful in 48s
All checks were successful
Build And Test / publish (push) Successful in 48s
This commit is contained in:
@@ -7,7 +7,7 @@ from services.calendar_service import CalendarService
|
||||
def register_calendar_tools(mcp: FastMCP, service: CalendarService):
|
||||
"""Register all calendar-related MCP tools."""
|
||||
|
||||
@mcp.tool(description="List all available calendars from the CalDAV server. Returns calendar ID, name, and properties.")
|
||||
@mcp.tool(description="List all available calendars from CalDAV and configured ICS feeds. Returns calendar ID, name, and properties.")
|
||||
def list_calendars() -> list[dict]:
|
||||
"""List all calendars."""
|
||||
calendars = service.list_calendars()
|
||||
@@ -26,7 +26,7 @@ def register_calendar_tools(mcp: FastMCP, service: CalendarService):
|
||||
Args:
|
||||
start_date: Start of date range (ISO format: YYYY-MM-DD)
|
||||
end_date: End of date range (ISO format: YYYY-MM-DD)
|
||||
calendar_id: The calendar ID (URL) to query. If not provided, lists from all calendars.
|
||||
calendar_id: The calendar ID (CalDAV URL or ICS ID) to query. If not provided, lists from all calendars.
|
||||
include_recurring: Whether to expand recurring events (default: True)
|
||||
"""
|
||||
if calendar_id:
|
||||
@@ -67,7 +67,7 @@ def register_calendar_tools(mcp: FastMCP, service: CalendarService):
|
||||
Get a specific event.
|
||||
|
||||
Args:
|
||||
calendar_id: The calendar ID containing the event
|
||||
calendar_id: The calendar ID (CalDAV URL or ICS ID) containing the event
|
||||
event_id: The unique ID (UID) of the event
|
||||
"""
|
||||
result = service.get_event(calendar_id, event_id)
|
||||
@@ -89,7 +89,7 @@ def register_calendar_tools(mcp: FastMCP, service: CalendarService):
|
||||
Create a new calendar event.
|
||||
|
||||
Args:
|
||||
calendar_id: The calendar ID to create the event in
|
||||
calendar_id: The calendar ID to create the event in (CalDAV only)
|
||||
title: Event title/summary
|
||||
start: Start datetime (ISO format: YYYY-MM-DDTHH:MM:SS)
|
||||
end: End datetime (ISO format: YYYY-MM-DDTHH:MM:SS)
|
||||
@@ -119,7 +119,7 @@ def register_calendar_tools(mcp: FastMCP, service: CalendarService):
|
||||
Update an existing event.
|
||||
|
||||
Args:
|
||||
calendar_id: The calendar ID containing the event
|
||||
calendar_id: The calendar ID containing the event (CalDAV only)
|
||||
event_id: The unique ID of the event to update
|
||||
title: New event title (optional)
|
||||
start: New start datetime (optional)
|
||||
@@ -143,7 +143,7 @@ def register_calendar_tools(mcp: FastMCP, service: CalendarService):
|
||||
Delete a calendar event.
|
||||
|
||||
Args:
|
||||
calendar_id: The calendar ID containing the event
|
||||
calendar_id: The calendar ID containing the event (CalDAV only)
|
||||
event_id: The unique ID of the event to delete
|
||||
notify_attendees: Whether to notify attendees of cancellation (default: True)
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user