Skip to main content
Glama

get_todays_events

Retrieve all Network School calendar events scheduled for today to stay informed about current activities and opportunities.

Instructions

Get all Network School events happening today

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main execution logic for the get_todays_events tool: fetches all events, filters to today's events, formats them, and returns as formatted text.
    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/index.ts:45-52 (registration)
    Registration of the get_todays_events tool in the ListToolsRequestSchema handler, defining name, description, and empty input schema.
    { name: 'get_todays_events', description: 'Get all Network School events happening today', inputSchema: { type: 'object', properties: {}, }, },
  • Input schema for get_todays_events tool (no parameters required).
    inputSchema: { type: 'object', properties: {}, },
  • Helper function to filter Luma events to only those happening today.
    export function filterTodaysEvents(entries: LumaEntry[]): LumaEntry[] { return entries.filter(entry => { const startDate = parseISO(entry.event.start_at); return isToday(startDate); }); }
  • LumaClient method to fetch all future events from the Luma API, used by the tool handler.
    async fetchEvents(): Promise<LumaResponse> { try { const response = await axios.get<LumaResponse>(LUMA_API_URL, { headers: { 'Accept': 'application/json', }, }); return response.data; } catch (error) { if (axios.isAxiosError(error)) { const status = error.response?.status; const statusText = error.response?.statusText; throw new Error(`Failed to fetch events from Luma API: ${status ? `${status} ${statusText}` : error.message}`); } if (error instanceof Error) { throw new Error(`Failed to fetch events from Luma API: ${error.message}`); } throw new Error('Failed to fetch events from Luma API: Unknown error'); } }

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/tHeMaskedMan981/ns-mcp'

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