Skip to content

Add delete_event MCP tool#27

Open
drPod wants to merge 1 commit intoOmar-V2:mainfrom
drPod:feature/delete-event-tool
Open

Add delete_event MCP tool#27
drPod wants to merge 1 commit intoOmar-V2:mainfrom
drPod:feature/delete-event-tool

Conversation

@drPod
Copy link
Copy Markdown

@drPod drPod commented Feb 17, 2026

Use this for the PR:


Title:
Add delete_event MCP tool


Description:

Exposes a delete_event MCP tool so AI clients can delete calendar events by ID.

Summary

  • The server previously exposed only list_calendars, list_events, create_event, and update_event. CalendarManager already had delete_event; this change adds the corresponding MCP tool.

Changes

  • New @mcp.tool() delete_event(event_id: str) -> str in src/mcp_ical/server.py that calls CalendarManager.delete_event(event_id).
  • Import and handling of NoSuchEventException for a clear “event not found” response.
  • Success and error responses aligned with the other event tools.

Testing

  • No new tests; deletion is already covered by CalendarManager integration tests (e.g. test_delete_event in tests/test_calendar_manager_integration.py).

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings February 17, 2026 05:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a delete_event MCP tool to enable AI clients to delete calendar events by their unique identifier. The implementation leverages the existing CalendarManager.delete_event() method and follows established patterns in the codebase for MCP tool design and error handling.

Changes:

  • Added delete_event MCP tool that accepts an event ID and returns a success/error message
  • Imported NoSuchEventException to provide specific error handling for non-existent events
  • Implemented proper exception handling with distinct messages for "event not found" vs. general errors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@drPod
Copy link
Copy Markdown
Author

drPod commented Feb 17, 2026

The delete_event logic was already implemented in CalendarManager in ical.py; this PR only exposes it as an MCP tool so AI clients can call it. No backend behavior was changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants