Skip to main content
Glama
taylorwilsdon

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

delete_event

Remove an event from a Google Calendar using the user's email, event ID, and calendar ID. Returns a confirmation of successful deletion.

Instructions

Deletes an existing event.

Args:
    user_google_email (str): The user's Google email address. Required.
    event_id (str): The ID of the event to delete.
    calendar_id (str): Calendar ID (default: 'primary').

Returns:
    str: Confirmation message of the successful event deletion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
calendar_idNoprimary
event_idYes
serviceYes
user_google_emailYes

Implementation Reference

  • The delete_event tool implementation, including registration via @server.tool(), error handling, service requirements, and the core logic to verify and delete the specified calendar event using the Google Calendar API.
    @server.tool()
    @handle_http_errors("delete_event", service_type="calendar")
    @require_google_service("calendar", "calendar_events")
    async def delete_event(service, user_google_email: str, event_id: str, calendar_id: str = "primary") -> str:
        """
        Deletes an existing event.
    
        Args:
            user_google_email (str): The user's Google email address. Required.
            event_id (str): The ID of the event to delete.
            calendar_id (str): Calendar ID (default: 'primary').
    
        Returns:
            str: Confirmation message of the successful event deletion.
        """
        logger.info(
            f"[delete_event] Invoked. Email: '{user_google_email}', Event ID: {event_id}"
        )
    
        # Log the event ID for debugging
        logger.info(
            f"[delete_event] Attempting to delete event with ID: '{event_id}' in calendar '{calendar_id}'"
        )
    
        # Try to get the event first to verify it exists
        try:
            await asyncio.to_thread(
                lambda: service.events().get(calendarId=calendar_id, eventId=event_id).execute()
            )
            logger.info(
                "[delete_event] Successfully verified event exists before deletion"
            )
        except HttpError as get_error:
            if get_error.resp.status == 404:
                logger.error(
                    f"[delete_event] Event not found during pre-delete verification: {get_error}"
                )
                message = f"Event not found during verification. The event with ID '{event_id}' could not be found in calendar '{calendar_id}'. This may be due to incorrect ID format or the event no longer exists."
                raise Exception(message)
            else:
                logger.warning(
                    f"[delete_event] Error during pre-delete verification, but proceeding with deletion: {get_error}"
                )
    
        # Proceed with the deletion
        await asyncio.to_thread(
            lambda: service.events().delete(calendarId=calendar_id, eventId=event_id).execute()
        )
    
        confirmation_message = f"Successfully deleted event (ID: {event_id}) from calendar '{calendar_id}' for {user_google_email}."
        logger.info(f"Event deleted successfully for {user_google_email}. ID: {event_id}")
        return confirmation_message
  • MCP tool registration decorator for delete_event.
    @server.tool()
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('deletes') and mentions a confirmation message return, but lacks critical details: whether deletion is permanent/reversible, required permissions, error conditions, or rate limits. For a destructive operation with zero annotation coverage, this leaves significant gaps in understanding tool behavior.

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

Conciseness4/5

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

The description is well-structured with clear sections (Args, Returns) and uses minimal sentences. Each sentence earns its place by defining the action, parameters, and return value. However, the 'Args' section could be more integrated with the main description rather than listed separately.

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 a destructive operation with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is insufficient. It covers basic purpose and some parameters but lacks behavioral context (permanence, permissions), full parameter documentation (missing 'service'), and comprehensive usage guidelines. For this complexity level, more detail is needed.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It documents 3 of the 4 parameters (user_google_email, event_id, calendar_id) with basic semantics, but omits the 'service' parameter entirely. The description adds value by explaining calendar_id's default and event_id's purpose, but fails to cover all parameters, leaving gaps in understanding.

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 tool's purpose with a specific verb ('deletes') and resource ('an existing event'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'modify_event' or explicitly contrast with other deletion-related operations that might exist in the broader context.

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 (like authentication), compare with 'modify_event' for partial updates, or indicate scenarios where deletion is appropriate versus other operations. The agent must infer usage from the name alone.

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

Related 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/taylorwilsdon/google_workspace_mcp'

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