get_todays_events
Retrieve all Network School calendar events scheduled for today to stay informed about daily activities and opportunities.
Instructions
Get all Network School events happening today
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_todays_events"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:45-52 (registration)Registration of the 'get_todays_events' tool in the list_tools handler, including name, description, and input schema.
{ name: 'get_todays_events', description: 'Get all Network School events happening today', inputSchema: { type: 'object', properties: {}, }, }, - src/index.ts:48-51 (schema)Input schema for get_todays_events tool: empty object (no parameters).
inputSchema: { type: 'object', properties: {}, }, - src/index.ts:170-186 (handler)Core handler logic: fetches all events via LumaClient, filters for today using filterTodaysEvents, formats with formatEventsList, returns formatted text response.
case 'get_todays_events': { const response = await lumaClient.fetchEvents(); const todaysEvents = filterTodaysEvents(response.entries); const formatted = formatEventsList( todaysEvents, 'No events scheduled for today.' ); return { content: [ { type: 'text', text: formatted, }, ], }; } - src/formatters.ts:75-80 (helper)Helper function to filter events occurring today using date-fns isToday check.
export function filterTodaysEvents(entries: LumaEntry[]): LumaEntry[] { return entries.filter(entry => { const startDate = parseISO(entry.event.start_at); return isToday(startDate); }); } - src/formatters.ts:114-120 (helper)Helper function to format a list of events into a readable markdown bullet-point list, or return empty message.
export function formatEventsList(entries: LumaEntry[], emptyMessage: string = 'No events found.'): string { if (entries.length === 0) { return emptyMessage; } return entries.map(entry => formatEvent(entry)).join('\n\n'); }