Skip to main content
Glama

cancel_calendar_event

Remove a scheduled event from Google Calendar by specifying the calendar and event identifiers to clear your schedule.

Instructions

Cancel (delete) a specific event from Google Calendar

Args: calendar_id: Calendar ID where the event exists event_id: The unique identifier of the event to cancel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
calendar_idYes
event_idYes

Implementation Reference

  • main.py:415-436 (handler)
    MCP tool registration and handler function for 'cancel_calendar_event'. This is the entry point called by the MCP server, which delegates to the GoogleCalendarTools helper.
    @mcp.tool()
    def cancel_calendar_event(calendar_id: str, event_id: str) -> str:
        """
        Cancel (delete) a specific event from Google Calendar
        
        Args:
            calendar_id: Calendar ID where the event exists
            event_id: The unique identifier of the event to cancel
        """
        try:
            result = GoogleCalendarTools.cancel_calendar_event(
                NANGO_CONNECTION_ID, NANGO_INTEGRATION_ID, calendar_id, event_id
            )
            
            return json.dumps(result, indent=2)
        except Exception as e:
            logger.error(f"Error in cancel_calendar_event: {e}")
            return json.dumps({
                "success": False,
                "error": str(e),
                "message": "Failed to cancel calendar event"
            }, indent=2)
  • Core helper method in GoogleCalendarTools class that performs the actual event deletion using Google Calendar API after authentication.
    @staticmethod
    def cancel_calendar_event(connection_id: str, provider_config_key: str, 
                             calendar_id: str, event_id: str) -> Dict:
        """Cancel (delete) a specific event from Google Calendar"""
        try:
            service = GoogleCalendarAuth.authenticate_google_calendar(connection_id, provider_config_key)
            
            service.events().delete(
                calendarId=calendar_id,
                eventId=event_id,
                sendUpdates='all'
            ).execute()
            
            return {
                "success": True,
                "message": f"Event {event_id} successfully cancelled",
                "event_id": event_id,
                "calendar_id": calendar_id
            }
            
        except HttpError as error:
            if hasattr(error, 'resp'):
                if error.resp.status == 404:
                    return {
                        "success": False,
                        "message": f"Event not found: {event_id}",
                        "error": "event_not_found",
                        "event_id": event_id
                    }
                elif error.resp.status == 403:
                    return {
                        "success": False,
                        "message": "Insufficient permissions to cancel this event",
                        "error": "permission_denied",
                        "event_id": event_id
                    }
            
            return {
                "success": False,
                "message": f"HTTP error occurred: {error}",
                "error": "http_error",
                "event_id": event_id
            }
        
        except Exception as error:
            logger.error(f'Unexpected error in cancel_calendar_event: {error}')
            return {
                "success": False,
                "message": f"Unexpected error occurred: {str(error)}",
                "error": "unexpected_error",
                "event_id": event_id
            }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool cancels/deletes an event, implying a destructive mutation, but lacks critical details: whether it requires specific permissions, if the action is reversible, what happens to attendees, or if there are rate limits. The description is minimal and doesn't compensate for the absence of annotations.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by a structured Args section. Every sentence adds value, with no redundant or vague phrasing. Minor deduction for not integrating parameter details more seamlessly, but overall it's efficient and well-organized.

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 the tool's complexity (destructive mutation with 2 parameters), no annotations, and no output schema, the description is minimally adequate but incomplete. It covers the basic action and parameters but lacks behavioral context (e.g., effects, permissions) and output details. For a deletion tool, this leaves significant gaps for an AI agent to operate safely and effectively.

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

Parameters4/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 fully explain parameters. It explicitly lists both parameters (calendar_id, event_id) with brief clarifications ('Calendar ID where the event exists', 'The unique identifier of the event to cancel'), adding meaningful context beyond the schema's basic titles. However, it doesn't specify format (e.g., email-like for calendar_id) or examples, leaving some ambiguity.

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

Purpose5/5

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

The description clearly states the specific action ('Cancel (delete)') and resource ('a specific event from Google Calendar'), distinguishing it from sibling tools like create_meet_event (creation) and get_calendar_events (retrieval). The verb+resource combination is precise and unambiguous.

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?

No guidance is provided on when to use this tool versus alternatives. While the purpose is clear, there's no mention of prerequisites (e.g., needing an existing event), exclusions (e.g., not for recurring events), or comparisons to other tools like delete_event if it existed. The description assumes context but doesn't provide explicit usage rules.

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/Shameerpc5029/google-calendar-mcp'

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