Skip to main content
Glama
alcylu

Nightlife Search

submit_to_guest_list

Submit a guest list entry for an event or venue. Provide event ID or venue ID with service date, customer name, and email to receive a confirmation with door instructions and guest list benefits.

Instructions

Submit a guest list entry for an event or venue. Provide either event_id or venue_id + service_date. Returns confirmation with door instructions and guest list benefits if available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_idNo
venue_idNo
service_dateNo
customer_nameYes
customer_emailYes
customer_phoneNo
messaging_channelNo
messaging_handleNo
languageNoen
sourceNoconcierge

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
entry_idYes
statusYes
event_nameYes
event_dateYes
messageYes
guest_list_benefitYes
door_instructionsYes

Implementation Reference

  • The main handler function for the 'submit_to_guest_list' tool. Resolves event context, checks guest list availability, cutoff time, capacity, duplicates, then inserts a guest list entry into the database and returns a confirmation response.
    export async function submitToGuestList(
      supabase: SupabaseClient,
      input: SubmitInput,
    ): Promise<SubmitOutput> {
      // 1. Resolve event context
      const ctx = await resolveEventContext(
        supabase,
        input.event_id,
        input.venue_id,
        input.service_date,
      );
    
      // 2. Load guest list settings
      const settings = await loadGuestListSettings(supabase, ctx.event_day_id, ctx.venue_id);
    
      if (!settings || settings.enabled === false) {
        throw new NightlifeError(
          "GUEST_LIST_NOT_AVAILABLE",
          "Guest list is not available for this event",
        );
      }
    
      // 3. Check cutoff time
      if (settings.cutoff_time && ctx.service_date) {
        const now = new Date();
        const tokyoFormatter = new Intl.DateTimeFormat("en-US", {
          timeZone: "Asia/Tokyo",
          hour: "2-digit",
          minute: "2-digit",
          hourCycle: "h23",
        });
        const nowParts = tokyoFormatter.formatToParts(now);
        const nowHour = Number(nowParts.find((p) => p.type === "hour")?.value ?? 0);
        const nowMinute = Number(nowParts.find((p) => p.type === "minute")?.value ?? 0);
        const nowMinutes = nowHour * 60 + nowMinute;
    
        const [cutoffH, cutoffM] = settings.cutoff_time.split(":").map(Number);
        const cutoffMinutes = cutoffH * 60 + cutoffM;
    
        // Only check cutoff if the service date is today
        const dateFormatter = new Intl.DateTimeFormat("en-CA", { timeZone: "Asia/Tokyo" });
        const todayStr = dateFormatter.format(now);
        if (ctx.service_date === todayStr && nowMinutes >= cutoffMinutes) {
          return {
            entry_id: "",
            status: "closed",
            event_name: ctx.event_name,
            event_date: ctx.event_date,
            message: "Guest list has closed for tonight. Consider VIP table booking instead.",
            guest_list_benefit: null,
            door_instructions: null,
          };
        }
      }
    
      // 4. Check capacity
      if (settings.capacity) {
        const currentCount = await countExistingEntries(
          supabase,
          ctx.event_day_id,
          ctx.venue_id,
          ctx.service_date,
        );
        if (currentCount >= settings.capacity) {
          return {
            entry_id: "",
            status: "full",
            event_name: ctx.event_name,
            event_date: ctx.event_date,
            message: "Guest list is full for this event. Consider VIP table booking instead.",
            guest_list_benefit: null,
            door_instructions: null,
          };
        }
      }
    
      // 5. Check duplicate
      const isDuplicate = await checkDuplicate(
        supabase,
        input.customer_email,
        ctx.event_day_id,
        ctx.venue_id,
        ctx.service_date,
      );
      if (isDuplicate) {
        throw new NightlifeError(
          "GUEST_LIST_DUPLICATE",
          "This email is already on the guest list for this event",
        );
      }
    
      // 6. Insert entry
      const insertData: Record<string, unknown> = {
        email: input.customer_email.toLowerCase(),
        name: input.customer_name,
        group_size: 1,
        language: input.language,
        source: input.source,
      };
    
      if (input.customer_phone) insertData.messaging_handle = input.customer_phone;
      if (input.messaging_channel) insertData.messaging_channel = input.messaging_channel;
      if (input.messaging_handle) insertData.messaging_handle = input.messaging_handle;
      if (ctx.event_day_id) insertData.event_day_id = ctx.event_day_id;
      if (ctx.venue_id) insertData.venue_id = ctx.venue_id;
      if (ctx.service_date) insertData.service_date = ctx.service_date;
    
      const { data: entry, error } = await supabase
        .from("event_guest_list_entries")
        .insert(insertData)
        .select("id, created_at")
        .single();
    
      if (error) {
        throw new NightlifeError("DB_QUERY_FAILED", `Failed to create guest list entry: ${error.message}`);
      }
    
      const message = settings.confirmation_message_en
        || "You're on the guest list! Show this confirmation at the door.";
    
      return {
        entry_id: entry.id,
        status: "confirmed",
        event_name: ctx.event_name,
        event_date: ctx.event_date,
        message,
        guest_list_benefit: settings.benefit_en ?? null,
        door_instructions: settings.door_instructions_en ?? null,
      };
    }
  • Input schema for submit_to_guest_list. Accepts event_id or venue_id+service_date, plus customer_name, customer_email, and optional fields like phone, messaging, language, and source.
    export const submitToGuestListInputSchema = {
      event_id: z.string().optional(),
      venue_id: z.string().optional(),
      service_date: z.string().optional(),
      customer_name: z.string().min(1),
      customer_email: z.string().min(1),
      customer_phone: z.string().optional(),
      messaging_channel: z.string().optional(),
      messaging_handle: z.string().optional(),
      language: z.string().default("en"),
      source: z.string().default("concierge"),
    };
  • Output schema for submit_to_guest_list. Returns entry_id, status (confirmed/full/closed), event_name, event_date, message, guest_list_benefit, and door_instructions.
    export const submitToGuestListOutputSchema = z.object({
      entry_id: z.string(),
      status: z.enum(["confirmed", "full", "closed"]),
      event_name: z.string().nullable(),
      event_date: z.string().nullable(),
      message: z.string(),
      guest_list_benefit: z.string().nullable(),
      door_instructions: z.string().nullable(),
    });
  • Registration of the submit_to_guest_list tool via server.registerTool(). Wires the tool name, description, input/output schemas, and handler (which calls submitToGuestList from the service layer).
    export function registerGuestListTools(server: McpServer, deps: ToolDeps): void {
      server.registerTool(
        "submit_to_guest_list",
        {
          description:
            "Submit a guest list entry for an event or venue. Provide either event_id or venue_id + service_date. Returns confirmation with door instructions and guest list benefits if available.",
          inputSchema: submitToGuestListInputSchema,
          outputSchema: submitToGuestListOutputSchema,
        },
        async (args) => runTool(
          "submit_to_guest_list",
          submitToGuestListOutputSchema,
          async () => submitToGuestList(deps.supabase, args),
        ),
      );
  • src/server.ts:37-37 (registration)
    Top-level registration call: registerGuestListTools(server, { supabase }) inside createNightlifeServer().
    registerGuestListTools(server, { supabase });
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It confirms the operation is a submission (likely a write), but does not mention side effects (e.g., overwriting existing entries), required authentication, rate limits, or idempotency. The description is insufficient for an agent to understand the tool's behavior.

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

Conciseness4/5

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

The description is concise with two sentences. It front-loads the primary purpose and conditional logic. However, it could benefit from a slightly more structured format (e.g., listing key points) to improve scannability.

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 the tool's complexity (10 parameters, 2 required, no annotations), the description is too sparse. It doesn't cover expected input formats, validation rules, or what happens on error. The presence of an output schema partially compensates, but the description fails to provide enough context for reliable tool invocation.

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

Parameters2/5

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

With 0% schema description coverage, the description should clarify parameter meanings. It only explains the conditional parameters (event_id, venue_id, service_date). Other important parameters like messaging_channel, source, and language are undocumented, leaving the agent to guess their purpose.

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 ('Submit a guest list entry') and the resource ('event or venue'), and specifies that the tool returns confirmation, door instructions, and benefits. However, it does not explicitly differentiate from sibling tools like create_vip_booking_request or get_guest_list_entry_status, which could cause confusion.

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

Usage Guidelines3/5

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

The description provides a clear usage condition: 'Provide either event_id or venue_id + service_date.' This helps the agent select the correct parameters. However, it lacks guidance on when to use this tool versus alternatives like create_vip_booking_request, and does not mention any prerequisites or error conditions.

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/alcylu/nightlife-mcp'

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