Skip to content

Commit f93b02e

Browse files
committed
improvement(luma): expand host response fields and harden event ID inputs
1 parent b42f80e commit f93b02e

File tree

10 files changed

+63
-14
lines changed

10 files changed

+63
-14
lines changed

apps/docs/content/docs/en/tools/luma.mdx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ Retrieve details of a Luma event including name, time, location, hosts, and visi
7070
|`geoLongitude` | string | Venue longitude coordinate |
7171
|`calendarId` | string | Associated calendar ID |
7272
| `hosts` | array | Event hosts |
73-
|`name` | string | Host name |
73+
|`id` | string | Host ID |
74+
|`name` | string | Host display name |
75+
|`firstName` | string | Host first name |
76+
|`lastName` | string | Host last name |
7477
|`email` | string | Host email address |
78+
|`avatarUrl` | string | Host avatar image URL |
7579

7680
### `luma_create_event`
7781

@@ -115,8 +119,12 @@ Create a new event on Luma with a name, start time, timezone, and optional detai
115119
|`geoLongitude` | string | Venue longitude coordinate |
116120
|`calendarId` | string | Associated calendar ID |
117121
| `hosts` | array | Event hosts |
118-
|`name` | string | Host name |
122+
|`id` | string | Host ID |
123+
|`name` | string | Host display name |
124+
|`firstName` | string | Host first name |
125+
|`lastName` | string | Host last name |
119126
|`email` | string | Host email address |
127+
|`avatarUrl` | string | Host avatar image URL |
120128

121129
### `luma_update_event`
122130

@@ -161,8 +169,12 @@ Update an existing Luma event. Only the fields you provide will be changed; all
161169
|`geoLongitude` | string | Venue longitude coordinate |
162170
|`calendarId` | string | Associated calendar ID |
163171
| `hosts` | array | Event hosts |
164-
|`name` | string | Host name |
172+
|`id` | string | Host ID |
173+
|`name` | string | Host display name |
174+
|`firstName` | string | Host first name |
175+
|`lastName` | string | Host last name |
165176
|`email` | string | Host email address |
177+
|`avatarUrl` | string | Host avatar image URL |
166178

167179
### `luma_list_events`
168180

@@ -177,7 +189,7 @@ List events from your Luma calendar with optional date range filtering, sorting,
177189
| `before` | string | No | Return events before this ISO 8601 datetime \(e.g., 2025-12-31T23:59:59Z\) |
178190
| `paginationLimit` | number | No | Maximum number of events to return per page |
179191
| `paginationCursor` | string | No | Pagination cursor from a previous response \(next_cursor\) to fetch the next page of results |
180-
| `sortColumn` | string | No | Column to sort by \(e.g., start_at\) |
192+
| `sortColumn` | string | No | Column to sort by \(only start_at is supported\) |
181193
| `sortDirection` | string | No | Sort direction: asc, desc, asc nulls last, or desc nulls last |
182194

183195
#### Output

apps/sim/blocks/blocks/luma.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,25 @@ Return ONLY the ISO 8601 timestamp - no explanations, no quotes, no extra text.`
370370
},
371371

372372
outputs: {
373-
event: { type: 'json', description: 'Event details' },
374-
hosts: { type: 'json', description: 'Event hosts' },
375-
events: { type: 'json', description: 'List of events' },
376-
guests: { type: 'json', description: 'List of guests' },
373+
event: {
374+
type: 'json',
375+
description:
376+
'Event details (id, name, startAt, endAt, timezone, durationInterval, createdAt, description, descriptionMd, coverUrl, url, visibility, meetingUrl, geoAddressJson, geoLatitude, geoLongitude, calendarId)',
377+
},
378+
hosts: {
379+
type: 'json',
380+
description: 'Event hosts (id, name, firstName, lastName, email, avatarUrl)',
381+
},
382+
events: {
383+
type: 'json',
384+
description:
385+
'List of events, each with id, name, startAt, endAt, timezone, durationInterval, createdAt, description, descriptionMd, coverUrl, url, visibility, meetingUrl, geoAddressJson, geoLatitude, geoLongitude, calendarId',
386+
},
387+
guests: {
388+
type: 'json',
389+
description:
390+
'List of guests (id, email, name, firstName, lastName, approvalStatus, registeredAt, invitedAt, joinedAt, checkedInAt, phoneNumber)',
391+
},
377392
hasMore: { type: 'boolean', description: 'Whether more results are available' },
378393
nextCursor: { type: 'string', description: 'Pagination cursor for next page' },
379394
},

apps/sim/tools/luma/add_guests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const addGuestsTool: ToolConfig<LumaAddGuestsParams, LumaAddGuestsRespons
4747
guestsArray = [{ email: params.guests }]
4848
}
4949
return {
50-
event_id: params.eventId,
50+
event_id: params.eventId.trim(),
5151
guests: guestsArray,
5252
}
5353
},

apps/sim/tools/luma/create_event.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,12 @@ export const createEventTool: ToolConfig<LumaCreateEventParams, LumaCreateEventR
106106

107107
const event = data.event
108108
const hosts = (data.hosts ?? []).map((h: Record<string, unknown>) => ({
109+
id: (h.id as string) ?? null,
109110
name: (h.name as string) ?? null,
111+
firstName: (h.first_name as string) ?? null,
112+
lastName: (h.last_name as string) ?? null,
110113
email: (h.email as string) ?? null,
114+
avatarUrl: (h.avatar_url as string) ?? null,
111115
}))
112116

113117
return {

apps/sim/tools/luma/get_event.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const getEventTool: ToolConfig<LumaGetEventParams, LumaGetEventResponse>
2727
request: {
2828
url: (params) => {
2929
const url = new URL('https://public-api.luma.com/v1/event/get')
30-
url.searchParams.set('id', params.eventId)
30+
url.searchParams.set('id', params.eventId.trim())
3131
return url.toString()
3232
},
3333
method: 'GET',
@@ -46,8 +46,12 @@ export const getEventTool: ToolConfig<LumaGetEventParams, LumaGetEventResponse>
4646

4747
const event = data.event
4848
const hosts = (data.hosts ?? []).map((h: Record<string, unknown>) => ({
49+
id: (h.id as string) ?? null,
4950
name: (h.name as string) ?? null,
51+
firstName: (h.first_name as string) ?? null,
52+
lastName: (h.last_name as string) ?? null,
5053
email: (h.email as string) ?? null,
54+
avatarUrl: (h.avatar_url as string) ?? null,
5155
}))
5256

5357
return {

apps/sim/tools/luma/get_guests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const getGuestsTool: ToolConfig<LumaGetGuestsParams, LumaGetGuestsRespons
5959
request: {
6060
url: (params) => {
6161
const url = new URL('https://public-api.luma.com/v1/event/get-guests')
62-
url.searchParams.set('event_id', params.eventId)
62+
url.searchParams.set('event_id', params.eventId.trim())
6363
if (params.approvalStatus) url.searchParams.set('approval_status', params.approvalStatus)
6464
if (params.paginationLimit)
6565
url.searchParams.set('pagination_limit', String(params.paginationLimit))

apps/sim/tools/luma/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { getGuestsTool } from '@/tools/luma/get_guests'
55
import { listEventsTool } from '@/tools/luma/list_events'
66
import { updateEventTool } from '@/tools/luma/update_event'
77

8+
export * from './types'
9+
810
export const lumaAddGuestsTool = addGuestsTool
911
export const lumaCreateEventTool = createEventTool
1012
export const lumaGetEventTool = getEventTool

apps/sim/tools/luma/list_events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const listEventsTool: ToolConfig<LumaListEventsParams, LumaListEventsResp
4545
type: 'string',
4646
required: false,
4747
visibility: 'user-or-llm',
48-
description: 'Column to sort by (e.g., start_at)',
48+
description: 'Column to sort by (only start_at is supported)',
4949
},
5050
sortDirection: {
5151
type: 'string',

apps/sim/tools/luma/types.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,12 @@ export interface LumaAddGuestsParams {
5959
}
6060

6161
export interface LumaHostEntry {
62+
id: string | null
6263
name: string | null
64+
firstName: string | null
65+
lastName: string | null
6366
email: string | null
67+
avatarUrl: string | null
6468
}
6569

6670
export interface LumaEventEntry {
@@ -141,8 +145,12 @@ export interface LumaAddGuestsResponse extends ToolResponse {
141145
}
142146

143147
export const LUMA_HOST_OUTPUT_PROPERTIES = {
144-
name: { type: 'string' as const, description: 'Host name' },
148+
id: { type: 'string' as const, description: 'Host ID' },
149+
name: { type: 'string' as const, description: 'Host display name' },
150+
firstName: { type: 'string' as const, description: 'Host first name' },
151+
lastName: { type: 'string' as const, description: 'Host last name' },
145152
email: { type: 'string' as const, description: 'Host email address' },
153+
avatarUrl: { type: 'string' as const, description: 'Host avatar image URL' },
146154
}
147155

148156
export const LUMA_EVENT_OUTPUT_PROPERTIES = {

apps/sim/tools/luma/update_event.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export const updateEventTool: ToolConfig<LumaUpdateEventParams, LumaUpdateEventR
8989
}),
9090
body: (params) => {
9191
const body: Record<string, unknown> = {
92-
id: params.eventId,
92+
id: params.eventId.trim(),
9393
}
9494
if (params.name) body.name = params.name
9595
if (params.startAt) body.start_at = params.startAt
@@ -113,8 +113,12 @@ export const updateEventTool: ToolConfig<LumaUpdateEventParams, LumaUpdateEventR
113113

114114
const event = data.event
115115
const hosts = (data.hosts ?? []).map((h: Record<string, unknown>) => ({
116+
id: (h.id as string) ?? null,
116117
name: (h.name as string) ?? null,
118+
firstName: (h.first_name as string) ?? null,
119+
lastName: (h.last_name as string) ?? null,
117120
email: (h.email as string) ?? null,
121+
avatarUrl: (h.avatar_url as string) ?? null,
118122
}))
119123

120124
return {

0 commit comments

Comments
 (0)