Tool: search_events
Searches events on the user's primary calendar using semantic search.
The following sample demonstrate how to use curl to invoke the search_events MCP tool.
| Curl Request |
|---|
curl --location 'https://calendarmcp.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "search_events", "arguments": { // provide these details according to the tool MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request message for SearchEvents.
SearchEventsRequest
| JSON representation |
|---|
{ "query": string, "pageSize": integer "pageToken": string } |
| Fields | |
|---|---|
query |
Required. Query string to search for events (case-insensitive). |
Union field
|
|
pageSize |
Optional. Maximum number of entries returned on one result page. |
Union field
|
|
pageToken |
Optional. Token specifying which result page to return. |
Output Schema
Response message for SearchEvents.
SearchEventsResponse
| JSON representation |
|---|
{
"events": [
{
object ( |
| Fields | |
|---|---|
events[] |
List of events matching the query. |
Union field
|
|
nextPageToken |
Token used to access the next page of this result. |
Event
| JSON representation |
|---|
{ "id": string, "status": string, "htmlLink": string, "created": string, "updated": string, "summary": string, "description": string, "location": string, "creator": { object ( |
| Fields | |
|---|---|
id |
Unique identifier. |
status |
Optional. Status. Possible values are:
|
htmlLink |
Output only. An absolute link to this event in the Google Calendar Web UI. |
created |
Output only. Creation time (ISO 8601). |
updated |
Output only. Last modification time (ISO 8601). |
summary |
Title. |
description |
Optional. Description. Can contain HTML. |
location |
Optional. Location. |
creator |
Output only. Creator. |
organizer |
Output only. Organizer. Also listed in attendees if attending. |
start |
Start time (inclusive). For recurring events the first instance is used.. |
end |
End time (exclusive). For recurring events the first instance is used. |
recurrence[] |
Recurrence rules as |
recurringEventId |
Parent recurring event ID for instances of recurring events. |
originalStartTime |
Original start time of recurring instances. This is the time at which this instance would start according to the recurrence data. |
transparency |
Optional. Deprecated: use |
visibility |
Optional. Visibility of the event. Possible values are:
|
attendees[] |
Attendees. |
conferenceUrl |
Video conference link. |
colorId |
The color of the event. Only affects your own calendar view. This is an ID referring to an entry in the calendar's color palette (string
|
overrideReminders[] |
Reminders. Falls back to calendar defaults if unset. |
attachments[] |
File attachments. |
guestPermissions |
Guest permissions. |
eventType |
Event type. |
workingLocationProperties |
Working location properties. Populated only when |
availability |
Optional. Availability setting. |
Principal
| JSON representation |
|---|
{ "email": string, "displayName": string, "self": boolean } |
| Fields | |
|---|---|
email |
Email. |
displayName |
Name. |
self |
Output only. Whether this principal corresponds to the calendar on which this copy of the event appears. Default: |
DateOrDateTime
| JSON representation |
|---|
{ "date": string, "dateTime": string, "timeZone": string } |
| Fields | |
|---|---|
date |
ISO 8601 date at midnight UTC (for example, |
dateTime |
ISO 8601 timestamp (for example, |
timeZone |
TZDB timezone name. |
Attendee
| JSON representation |
|---|
{ "id": string "email": string "displayName": string "organizer": boolean "self": boolean "resource": boolean "optionalAttendee": boolean "responseStatus": string "comment": string "additionalGuests": integer } |
| Fields | |
|---|---|
Union field
|
|
id |
Output only. Profile ID. |
Union field
|
|
email |
Required. Attendee's email address. |
Union field
|
|
displayName |
Optional. Name. |
Union field
|
|
organizer |
Output only. Whether attendee is the organizer. Default: |
Union field
|
|
self |
Output only. Whether this entry represents the calendar on which this copy of the event appears. Default: |
Union field
|
|
resource |
Optional. Whether attendee is a resource (for example, room). Immutable, can only be set when the attendee is initially added. Default: |
Union field
|
|
optionalAttendee |
Optional. Whether attendee is optional. Default: |
Union field
|
|
responseStatus |
Optional. Response status. Possible values are:
|
Union field
|
|
comment |
Output only. Response comment. |
Union field
|
|
additionalGuests |
Optional. Number of additional guests. Default: |
Reminder
| JSON representation |
|---|
{ "method": string "minutes": integer } |
| Fields | |
|---|---|
Union field
|
|
method |
Required. Delivery method. Possible values are:
|
Union field
|
|
minutes |
Required. Minutes in advance that the reminder is triggered. |
Attachment
| JSON representation |
|---|
{ "fileUrl": string "title": string } |
| Fields | |
|---|---|
Union field
|
|
fileUrl |
Required. URL link to the attachment. |
Union field
|
|
title |
Optional. Attachment title. |
GuestPermissions
| JSON representation |
|---|
{ "guestsCanInviteOthers": boolean "guestsCanModify": boolean "guestsCanSeeGuests": boolean } |
| Fields | |
|---|---|
Union field
|
|
guestsCanInviteOthers |
Optional. Whether guests can invite others. |
Union field
|
|
guestsCanModify |
Optional. Whether guests can modify the event. |
Union field
|
|
guestsCanSeeGuests |
Optional. Whether guests can see other guests. |
WorkingLocationProperties
| JSON representation |
|---|
{
"type": enum ( |
| Fields | |
|---|---|
Union field
|
|
type |
Optional. Working location type. |
Union field
|
|
customLocationLabel |
Optional. The label for a custom location. Required if type is |
EventType
Event type. Immutable after creation.
| Enums | |
|---|---|
EVENT_TYPE_UNSPECIFIED |
Treated as DEFAULT. |
DEFAULT |
Regular event. Default value. |
OUT_OF_OFFICE |
Out-of-office event. |
FOCUS_TIME |
Focus-time event. |
WORKING_LOCATION |
Working location event. |
BIRTHDAY |
Special all-day event with an annual recurrence. |
FROM_GMAIL |
Event from Gmail. This type of event cannot be created. |
WorkingLocationType
Type of working location.
| Enums | |
|---|---|
WORKING_LOCATION_TYPE_UNSPECIFIED |
Unspecified working location type. Will be treated as HOME_OFFICE. |
HOME_OFFICE |
Home office. |
CUSTOM_LOCATION |
Custom location. |
Availability
Availability setting for an event.
| Enums | |
|---|---|
AVAILABILITY_UNSPECIFIED |
Default. Treated as BUSY. |
AVAILABILITY_BUSY |
Blocks time on calendar. |
AVAILABILITY_FREE |
Does not block time. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌