Skip to main content
Glama

delete_calendar_event

Remove Google Calendar events directly from your Obsidian workflow to maintain organized schedules and prevent outdated appointments.

Instructions

Delete a Google Calendar event

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNo
event_idYes
update_noteNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler that deletes the specified Google Calendar event by ID, optionally cleans up linked Obsidian note frontmatter, and requires confirmation.
        name="delete_calendar_event",
        description="Delete a Google Calendar event",
    )
    async def delete_calendar_event(
        event_id: str, update_note: bool = True, confirm: bool = False
    ) -> str:
        """
        Delete a calendar event.
    
        Args:
            event_id: Calendar event ID
            update_note: If true, remove event info from linked note (default: true)
            confirm: Must be set to true to confirm event deletion
    
        Returns:
            Success message
        """
        if not confirm:
            return (
                "Error: Calendar event deletion requires explicit confirmation. "
                "Please set confirm=true to proceed with deleting this event."
            )
        if not event_id or not event_id.strip():
            return "Error: Event ID cannot be empty"
    
        context = _get_context()
    
        try:
            # Get event details before deleting (for note update)
            calendar = context.get_calendar()
    
            if update_note:
                try:
                    event = calendar.get_event(event_id)
                    description = event.get("description", "")
    
                    # Extract note path from obsidian:// link
                    if "obsidian://" in description:
                        # Find the note path in the link
                        start_idx = description.find(context.config.obsidian_url_base)
                        if start_idx != -1:
                            note_path = description[start_idx + len(context.config.obsidian_url_base) :]
                            # Extract until next whitespace or newline
                            note_path = note_path.split()[0] if note_path else ""
    
                            if note_path and context.vault.note_exists(note_path):
                                # Remove calendar event info from frontmatter
                                note = await context.vault.read_note(note_path)
                                if note.frontmatter:
                                    frontmatter = dict(note.frontmatter)
                                    frontmatter.pop("calendar_event_id", None)
                                    frontmatter.pop("calendar_event_link", None)
                                    frontmatter.pop("calendar_event_date", None)
                                    frontmatter.pop("calendar_event_time", None)
                                    await context.vault.update_note(note_path, note.body, frontmatter)
                except Exception as e:
                    logger.warning(f"Failed to update note: {e}")
    
            # Delete the event
            calendar.delete_event(event_id)
    
            return f"✓ Deleted calendar event: {event_id}"
    
        except CalendarAuthError as e:
            return f"Error: Calendar not configured: {e}"
        except CalendarError as e:
            return f"Error deleting event: {e}"
        except Exception as e:
            logger.exception("Error deleting calendar event")
            return f"Error deleting calendar event: {e}"
  • Core CalendarService method that calls Google Calendar API to delete the event by ID.
    def delete_event(self, event_id: str) -> None:
        """
        Delete a calendar event.
    
        Args:
            event_id: Event ID to delete
    
        Raises:
            CalendarError: If deletion fails
        """
        service = self.get_service()
    
        try:
            service.events().delete(calendarId=self.calendar_id, eventId=event_id).execute()
            logger.info(f"Deleted calendar event: {event_id}")
        except HttpError as e:
            raise CalendarError(f"Failed to delete event: {e}") from e
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Delete' implies a destructive mutation, but the description doesn't specify if deletion is permanent, requires specific permissions, sends notifications, or has rate limits. It also doesn't explain the role of parameters like 'confirm' or 'update_note' in the deletion behavior, leaving critical operational details unclear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that states the core action without unnecessary words. It's appropriately sized for a simple tool, with zero waste or redundancy, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a destructive mutation tool with 3 parameters, 0% schema coverage, no annotations, and an output schema (which might help with return values), the description is incomplete. It lacks essential details like behavioral traits, parameter explanations, and usage context, making it inadequate for safe and effective tool invocation by an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description must compensate by explaining parameters. It adds no meaning beyond the schema—it doesn't clarify what 'event_id' refers to, why 'confirm' is needed, or what 'update_note' does. With 3 parameters and no schema descriptions, this leaves significant gaps in understanding how to invoke the tool correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Delete') and resource ('Google Calendar event'), making the purpose immediately understandable. It distinguishes from siblings like 'update_calendar_event' or 'get_calendar_event' by specifying deletion. However, it doesn't explicitly mention what distinguishes it from 'delete_note' (a different resource type), so it's not fully specific about sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing event_id), when not to use it (e.g., for soft deletion), or refer to siblings like 'update_calendar_event' for modifications. Without such context, the agent must infer usage solely from the tool name and schema.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/getglad/obsidian_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server