Skip to main content
Glama

search_events

Search Network School calendar events by name or description to find relevant activities and opportunities.

Instructions

Search Network School events by name or description

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query string

Implementation Reference

  • Handler for the 'search_events' tool: validates query input, fetches events, filters using searchEvents helper, formats output with formatEventsList, and returns text content.
    case 'search_events': { const query = args?.query as string; if (!query || typeof query !== 'string') { return { content: [ { type: 'text', text: 'Error: query parameter is required and must be a string', }, ], isError: true, }; } const response = await lumaClient.fetchEvents(); const matchingEvents = searchEvents(response.entries, query); const formatted = formatEventsList( matchingEvents, `No events found matching "${query}".` ); return { content: [ { type: 'text', text: formatted, }, ], }; }
  • src/index.ts:67-80 (registration)
    Registration of the 'search_events' tool in list_tools handler, including name, description, and input schema.
    { name: 'search_events', description: 'Search Network School events by name or description', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query string', }, }, required: ['query'], }, },
  • Input schema definition for 'search_events' tool: requires 'query' string.
    inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query string', }, }, required: ['query'], },
  • Helper function searchEvents that filters events by matching query in event name or description (case-insensitive).
    export function searchEvents(entries: LumaEntry[], query: string): LumaEntry[] { const lowerQuery = query.toLowerCase(); return entries.filter(entry => { const nameMatch = entry.event.name.toLowerCase().includes(lowerQuery); const descriptionMatch = entry.event.description?.toLowerCase().includes(lowerQuery) || false; return nameMatch || descriptionMatch; }); }

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