Skip to main content
Glama
tHeMaskedMan981

Network School Events MCP Server

register_for_event

Register for Network School events by providing event ID, name, and email. Submit contact details to secure your spot in scheduled calendar activities.

Instructions

Register for a Network School event using the event ID from the event listing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_idYesThe event API ID (e.g., evt-xxx) from the event listing
nameYesFull name for registration
emailYesEmail address for registration
phone_numberNoPhone number (optional)
timezoneNoTimezone (default: Asia/Kuala_Lumpur)Asia/Kuala_Lumpur

Implementation Reference

  • MCP call_tool handler for 'register_for_event': validates input parameters (event_id, name, email, etc.) and delegates registration to LumaClient.registerForEvent, then formats success response.
          case 'register_for_event': {
            const eventId = args?.event_id as string;
            const name = args?.name as string;
            const email = args?.email as string;
            const phoneNumber = (args?.phone_number as string) || '';
            const timezone = (args?.timezone as string) || 'Asia/Kuala_Lumpur';
            
            if (!eventId || typeof eventId !== 'string') {
              return {
                content: [
                  {
                    type: 'text',
                    text: 'Error: event_id parameter is required and must be a string',
                  },
                ],
                isError: true,
              };
            }
    
            if (!name || typeof name !== 'string') {
              return {
                content: [
                  {
                    type: 'text',
                    text: 'Error: name parameter is required and must be a string',
                  },
                ],
                isError: true,
              };
            }
    
            if (!email || typeof email !== 'string') {
              return {
                content: [
                  {
                    type: 'text',
                    text: 'Error: email parameter is required and must be a string',
                  },
                ],
                isError: true,
              };
            }
    
            const registration = await lumaClient.registerForEvent(
              eventId,
              name,
              email,
              phoneNumber,
              timezone
            );
    
            const successMessage = `✅ Successfully registered for the event!
    
    Registration Details:
    - Name: ${name}
    - Email: ${registration.email}
    - Status: ${registration.approval_status}
    - Ticket Key: ${registration.ticket_key}
    - RSVP ID: ${registration.rsvp_api_id}
    
    ${registration.event_tickets.length > 0 ? `Ticket Type: ${registration.event_tickets[0].event_ticket_type_info.name} (${registration.event_tickets[0].event_ticket_type_info.type})` : ''}
    
    You should receive a confirmation email at ${registration.email}.`;
    
            return {
              content: [
                {
                  type: 'text',
                  text: successMessage,
                },
              ],
            };
          }
  • src/index.ts:81-112 (registration)
    Registration of the 'register_for_event' tool in the list_tools response, including name, description, and input schema definition.
    {
      name: 'register_for_event',
      description: 'Register for a Network School event using the event ID from the event listing',
      inputSchema: {
        type: 'object',
        properties: {
          event_id: {
            type: 'string',
            description: 'The event API ID (e.g., evt-xxx) from the event listing',
          },
          name: {
            type: 'string',
            description: 'Full name for registration',
          },
          email: {
            type: 'string',
            description: 'Email address for registration',
          },
          phone_number: {
            type: 'string',
            description: 'Phone number (optional)',
            default: '',
          },
          timezone: {
            type: 'string',
            description: 'Timezone (default: Asia/Kuala_Lumpur)',
            default: 'Asia/Kuala_Lumpur',
          },
        },
        required: ['event_id', 'name', 'email'],
      },
    },
  • Core helper method in LumaClient that implements the event registration logic: verifies event, fetches ticket details if possible, constructs registration request, and calls Luma API register endpoint.
    async registerForEvent(
      eventApiId: string,
      name: string,
      email: string,
      phoneNumber: string = '',
      timezone: string = 'Asia/Kuala_Lumpur'
    ): Promise<RegistrationResponse> {
      try {
        // First, fetch the event to verify it exists
        const events = await this.fetchEvents();
        const eventEntry = events.entries.find(e => e.event.api_id === eventApiId);
        
        if (!eventEntry) {
          throw new Error(`Event with ID ${eventApiId} not found`);
        }
    
        // Try to get event details to find ticket types
        let ticketTypeSelection: { [key: string]: { count: number; amount: number } } = {};
        
        try {
          const eventDetails = await this.getEventDetails(eventApiId);
          
          // Extract ticket types from event details
          if (eventDetails.event && eventDetails.event.event_ticket_types) {
            const ticketTypes = eventDetails.event.event_ticket_types;
            
            // Use the first available ticket type (typically "Standard" for free events)
            if (ticketTypes.length > 0) {
              const firstTicketType = ticketTypes[0];
              ticketTypeSelection[firstTicketType.api_id] = {
                count: 1,
                amount: firstTicketType.cents || 0
              };
            }
          }
        } catch (detailsError) {
          // If we can't get ticket details, we'll try without it
          console.error('Could not fetch event details, attempting registration without ticket type info');
        }
        
        const registrationData: Partial<RegisterRequest> = {
          name,
          first_name: '',
          last_name: '',
          email,
          event_api_id: eventApiId,
          for_waitlist: false,
          payment_method: null,
          payment_currency: null,
          registration_answers: [],
          coupon_code: null,
          timezone,
          token_gate_info: null,
          eth_address_info: null,
          phone_number: phoneNumber,
          solana_address_info: null,
          expected_amount_cents: 0,
          expected_amount_discount: 0,
          expected_amount_tax: 0,
          currency: null,
          event_invite_api_id: null,
          ticket_type_to_selection: ticketTypeSelection,
          solana_address: null,
          opened_from: {
            source: 'calendar',
            calendar_api_id: CALENDAR_API_ID,
          },
        };
    
        const response = await axios.post<RegistrationResponse>(
          LUMA_REGISTER_URL,
          registrationData,
          {
            headers: {
              'Accept': 'application/json',
              'Content-Type': 'application/json',
            },
          }
        );
    
        return response.data;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          const status = error.response?.status;
          const statusText = error.response?.statusText;
          const errorData = error.response?.data;
          throw new Error(
            `Failed to register for event: ${status ? `${status} ${statusText}` : error.message}${
              errorData ? ` - ${JSON.stringify(errorData)}` : ''
            }`
          );
        }
        if (error instanceof Error) {
          throw new Error(`Failed to register for event: ${error.message}`);
        }
        throw new Error('Failed to register for event: Unknown error');
      }
    }
  • TypeScript interface defining the structure of the Luma API registration request (RegisterRequest), used by the registerForEvent helper.
    export interface RegisterRequest {
      name: string;
      first_name: string;
      last_name: string;
      email: string;
      event_api_id: string;
      for_waitlist: boolean;
      payment_method: null;
      payment_currency: null;
      registration_answers: any[];
      coupon_code: null;
      timezone: string;
      token_gate_info: null;
      eth_address_info: null;
      phone_number: string;
      solana_address_info: null;
      expected_amount_cents: number;
      expected_amount_discount: number;
      expected_amount_tax: number;
      currency: null;
      event_invite_api_id: null;
      ticket_type_to_selection: {
        [key: string]: {
          count: number;
          amount: number;
        };
      };
      solana_address: null;
      opened_from: {
        source: string;
        calendar_api_id: string;
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It implies a write operation ('Register') but doesn't disclose behavioral traits such as authentication requirements, rate limits, error conditions, or what happens upon successful registration (e.g., confirmation email). This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, earning its place by conveying the core action and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns upon success or failure, nor does it cover behavioral aspects like side effects or error handling. The schema covers parameters well, but overall context for safe and effective use is lacking.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds no additional meaning beyond implying the event_id comes from a listing, which is already covered in the schema. Baseline 3 is appropriate as the schema handles parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Register for') and resource ('a Network School event'), specifying it uses an event ID from the event listing. However, it doesn't explicitly differentiate from sibling tools like get_todays_events or search_events, which are read-only queries rather than write operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance by mentioning the event ID comes from the event listing, but it doesn't specify when to use this tool versus alternatives (e.g., when registration is open vs. closed) or any prerequisites beyond having an event ID. No explicit exclusions or sibling comparisons are included.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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