Skip to main content
Glama
ZatesloFL

Google Workspace MCP Server

by ZatesloFL

delete_event

Remove scheduled events from Google Calendar using the user's email, event ID, and optional calendar ID. Confirms successful deletion for streamlined calendar management.

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
user_google_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'delete_event' tool. It verifies the event exists, deletes it using the Google Calendar API, and returns a confirmation message. Includes type hints and docstring defining input/output schema.
    @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
  • The @server.tool() decorator registers the delete_event function as an MCP tool.
    @server.tool()
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. It states the action ('Deletes') and return value, but lacks critical behavioral details: required permissions, whether deletion is permanent/reversible, error conditions (e.g., invalid event_id), or side effects. For a destructive operation with zero annotation coverage, this is a significant gap.

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 well-structured and front-loaded with the core purpose. The 'Args' and 'Returns' sections are organized efficiently, with no redundant sentences. Every part adds value, making it appropriately concise for a tool with three parameters.

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

Completeness3/5

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

Given a destructive tool with no annotations, 0% schema coverage, but an output schema (implied by 'Returns'), the description is minimally adequate. It covers parameters and return value, but lacks behavioral context (permissions, irreversibility) and usage guidelines. The output schema reduces the need to explain returns, but gaps remain.

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%, but the description compensates by documenting all three parameters in the 'Args' section, including data types and the default for 'calendar_id'. However, it doesn't explain parameter semantics beyond basic definitions (e.g., what constitutes a valid 'event_id', format of 'user_google_email'). The baseline is 3 due to partial compensation.

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 ('Deletes') and resource ('an existing event'), making the purpose unambiguous. It distinguishes itself from sibling tools like 'modify_event' by specifying deletion rather than modification. However, it doesn't explicitly contrast with other deletion tools (e.g., 'delete_task'), though those target different resources.

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 proper permissions), exclusions (e.g., cannot delete recurring events), or comparisons to sibling tools like 'modify_event' for updates. Usage context is implied but not stated.

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/ZatesloFL/google_workspace_mcp'

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