Usage #
// Import the typed helper
import { listEvents } from "@hotglue/sdk/google_calendar";
const result = await client.execute({
...listEvents({
calendar_id: string,
time_min: string,
time_max: string,
// ...
}),
userId: "user_123",
});
// result is typed as ListEventsOutput
const result = await client.execute({
integration: "google_calendar",
tool: "list_events",
userId: "user_123",
input: {
calendar_id: string,
time_min: string,
time_max: string,
// ...
},
});
// The agent will automatically use this tool when needed
const agent = new Agent({
tools: () => hotglueTools({
integrations: ["google_calendar"],
userId: "user_123",
}),
});
await agent.generate("run the List Events tool");
Required Permissions #
https://www.googleapis.com/auth/calendar.events.readonly
Input Schema #
calendar_id
string
required
Calendar identifier. Use "primary" for the primary calendar
time_min
string
Lower bound (inclusive) for event start time (RFC3339 timestamp)
time_max
string
Upper bound (exclusive) for event end time (RFC3339 timestamp)
q
string
Free text search terms to find events
single_events
bool
Whether to expand recurring events into instances
order_by
string
Sort order. Only valid when singleEvents is true for startTime
values:
startTime, updated
max_results
int
Maximum number of events returned (max 2500)
default:
250
page_token
string
Token for pagination
show_deleted
bool
Whether to include deleted events
This tool calls: #
GET
https://www.googleapis.com/calendar/v3/calendars/{calendar_id}/events