Skip to main content
Glama

detect_events_from_email

Analyze emails to identify calendar events by extracting dates, times, and contextual information for potential scheduling.

Instructions

    Detect potential calendar events from an email.
    
    This tool analyzes an email to identify potential calendar events
    based on dates, times, and contextual clues.
    
    Prerequisites:
    - The user must be authenticated
    - You need an email ID from list_emails() or search_emails()
    
    Args:
        email_id (str): The ID of the email to analyze for events
        
    Returns:
        Dict[str, Any]: The detected events including:
            - success: Whether the operation was successful
            - events: List of potential events with details
            - email_link: Link to the original email
            
    Example usage:
    1. Get an email: email = get_email(email_id="...")
    2. Detect events: events = detect_events_from_email(email_id="...")
    3. Ask the user if they want to add the events to their calendar
    4. Ask the user for any missing information (end time, location, description, attendees)
    5. If confirmed, create the events using create_calendar_event()
    
    Important:
    - Always ask for user confirmation before creating calendar events
    - Always ask for missing information like end time, location, description, and attendees
    - Never use default values without user input
    - Always include the event_link when discussing events with the user
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
email_idYes
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing behavioral traits: it explains the tool's analysis process (identifying events based on dates/times/clues), prerequisites (authentication, email ID source), and important constraints (always ask for confirmation, never use defaults). It doesn't mention rate limits or error handling, but covers key operational aspects.

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

Conciseness3/5

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

The description is appropriately structured with sections (purpose, prerequisites, args, returns, example, important), but it's verbose with 5 example steps and 4 'Important' rules that could be condensed. Some sentences (e.g., the full workflow) are redundant with usage guidelines, reducing efficiency.

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

Completeness4/5

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

Given no annotations and no output schema, the description provides good context: it explains the tool's purpose, parameters, returns (including specific fields like success, events, email_link), and integration with sibling tools. However, it lacks details on error cases or output structure beyond the high-level return dict description.

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

Parameters5/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 fully. It explicitly documents the single parameter email_id, explaining it's 'The ID of the email to analyze for events' and linking it to prerequisites (from list_emails or search_emails). This adds crucial meaning beyond the bare schema.

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 ('detect potential calendar events') and resource ('from an email'), distinguishing it from siblings like list_calendar_events or create_calendar_event. It explicitly mentions analyzing dates, times, and contextual clues, providing a precise purpose.

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

Usage Guidelines5/5

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

The description provides explicit prerequisites (authentication, email ID from list_emails or search_emails) and clear when-to-use guidance in the Example Usage section, which outlines a workflow and distinguishes this tool from create_calendar_event. It also specifies important usage rules like asking for confirmation and missing information.

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/bastienchabal/gmail-mcp'

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