Skip to main content
Glama

create_event

Schedule calendar events by specifying details like summary, start and end times, location, description, and attendees using this tool.

Instructions

Create a new calendar event

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attendeesNo
descriptionNo
endYes
locationNo
startYes
summaryYes

Implementation Reference

  • server.py:464-467 (registration)
    Registers the 'create_event' tool using the @mcp.tool decorator in FastMCP.
    @mcp.tool( name="create_event", description="Create a new calendar event", )
  • The handler function that implements the create_event tool logic, creating a new Google Calendar event via the Google Calendar API.
    async def create_event(summary: str, start: str, end: str, location: Optional[str] = None, description: Optional[str] = None, attendees: Optional[List[EmailStr]] = None) -> str: """ Create a new calendar event Args: summary (str): Event title start (str): Start datetime in ISO format end (str): End datetime in ISO format location (str, optional): Event location description (str, optional): Event description attendees (array, optional): List of attendee email addresses Returns: str: Success message """ creds = get_google_credentials() if not creds: return "Google authentication failed." try: service = build('calendar', 'v3', credentials=creds) # 타임존 설정 (필요시 수정 또는 자동 감지 로직 추가) event_tz = 'Asia/Seoul' event = { 'summary': summary, 'location': location or '' , 'description': description or '', 'start': {'dateTime': start, 'timeZone': event_tz}, 'end': {'dateTime': end, 'timeZone': event_tz}, } if attendees: event['attendees'] = [{'email': email} for email in attendees] logger.info(f"이벤트 생성 중: {event}") created_event = service.events().insert(calendarId='primary', body=event).execute() logger.info(f"이벤트 생성됨: {created_event.get('htmlLink')}") return f"이벤트 생성 성공. 이벤트 ID: {created_event['id']}" except HttpError as error: logger.error(f"API 오류 발생: {error}") return f"Calendar API 오류: {error.resp.status} - {error.content.decode()}" except Exception as e: logger.exception("이벤트 생성 중 오류:") return f"예상치 못한 오류 발생: {str(e)}"
  • Part of the list of available Google tools returned by the 'available-google-tools' resource, including create_event.
    "list_events", "create_event", "update_event", "delete_event", "search_google", "read_gdrive_file", "search_gdrive"

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/jikime/py-mcp-google-toolbox'

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