Skip to main content
Glama
alcylu

Nightlife Search

log_unmet_request

Records nightlife search queries that yield no suitable answer, capturing user intent, filters, and query details for product team follow-up.

Instructions

Log unmet user intent when no good nightlife answer is available, for product follow-up.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelNo
languageNo
cityNo
raw_queryYes
intentNo
suggested_filtersNo
user_hashNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
request_idYes
statusYes
created_atYes

Implementation Reference

  • Core handler that inserts an unmet request into the database. Validates raw_query, normalizes fields (channel, language, city, etc.), and writes to concierge_unmet_requests table. Returns request_id, status, and created_at.
    export async function logUnmetRequest(
      supabase: SupabaseClient,
      input: LogUnmetRequestInput,
    ): Promise<UnmetRequestResult> {
      const rawQuery = String(input.raw_query || "").trim();
      if (!rawQuery) {
        throw new NightlifeError("INVALID_REQUEST", "raw_query cannot be blank.");
      }
    
      const payload = {
        channel: normalizeChannel(input.channel),
        language: normalizeLanguage(input.language),
        city: normalizeCity(input.city),
        raw_query: rawQuery.slice(0, 4000),
        normalized_intent: normalizeIntent(input.intent),
        suggested_filters: normalizeSuggestedFilters(input.suggested_filters),
        user_hash: normalizeUserHash(input.user_hash),
        status: "open",
      };
    
      const { data, error } = await supabase
        .from("concierge_unmet_requests")
        .insert(payload)
        .select("id,status,created_at")
        .single<UnmetRequestRow>();
    
      if (error || !data) {
        throw new NightlifeError("REQUEST_WRITE_FAILED", "Failed to log unmet request.", {
          cause: error?.message || "Unknown insert error",
        });
      }
    
      return {
        request_id: data.id,
        status: data.status,
        created_at: data.created_at,
      };
    }
  • Input type definition for logUnmetRequest. Fields: channel, language, city, raw_query (required), intent, suggested_filters, user_hash.
    export type LogUnmetRequestInput = {
      channel?: string;
      language?: string;
      city?: string;
      raw_query: string;
      intent?: string;
      suggested_filters?: Record<string, unknown>;
      user_hash?: string;
    };
  • Return type interface for logUnmetRequest result.
    export interface UnmetRequestResult {
      request_id: string;
      status: string;
      created_at: string;
    }
  • Zod output schema used for runtime validation of the tool output (request_id, status, created_at).
    const unmetRequestOutputSchema = z.object({
      request_id: z.string(),
      status: z.string(),
      created_at: z.string(),
    });
  • Registration of the log_unmet_request MCP tool on the server. Defines description, inputSchema (channel, language, city, raw_query, intent, suggested_filters, user_hash), outputSchema, and the handler callback that invokes logUnmetRequest service.
    export function registerRequestTools(server: McpServer, deps: ToolDeps): void {
      server.registerTool(
        "log_unmet_request",
        {
          description:
            "Log unmet user intent when no good nightlife answer is available, for product follow-up.",
          inputSchema: {
            channel: z.string().optional(),
            language: z.string().optional(),
            city: z.string().optional(),
            raw_query: z.string().min(1),
            intent: z.string().optional(),
            suggested_filters: z.record(z.string(), z.unknown()).optional(),
            user_hash: z.string().optional(),
          },
          outputSchema: unmetRequestOutputSchema,
        },
        async (args) => runTool(
          "log_unmet_request",
          unmetRequestOutputSchema,
          async () => logUnmetRequest(deps.supabase, args),
        ),
      );
Behavior2/5

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

No annotations are provided, and the description only mentions logging without detailing side effects, data retention, or privacy implications, leaving behavioral traits vague.

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 sentence with no wasted words, effectively communicating the core purpose.

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?

For a tool with 7 parameters including a nested object and an output schema, the description provides insufficient context about parameter meanings and return values, making it incomplete for complex use.

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

Parameters1/5

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

Despite 0% schema description coverage, the description adds no explanation for any of the 7 parameters, leaving the agent without guidance on how to populate them.

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

Purpose5/5

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

The description clearly states the tool logs unmet user intent when no good nightlife answer is available, distinguishing it from siblings which handle bookings, events, and venue information.

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

Usage Guidelines4/5

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

The description specifies when to use (when no good nightlife answer), implying not to use when an answer exists, but does not explicitly state alternatives or when not to use.

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