Skip to main content
Glama

set_price_alert

Set price alerts for flights or hotels to receive notifications when prices drop to your target or during optimal booking windows.

Instructions

Create a price drop alert for a flight or hotel. Hopper will notify via the app/email when prices hit your target or when the optimal booking window opens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trip_typeYesType of travel to watch
originNoIATA airport code for flight origin
destinationYesDestination city or IATA code
travel_dateYesTravel/check-in date in YYYY-MM-DD format
target_priceYesAlert threshold price in USD
emailYesEmail address to send price alerts to

Implementation Reference

  • Implementation of the set_price_alert tool handler.
    async function setPriceAlert(params: PriceAlertParams): Promise<string> {
      // Hopper's alert functionality requires authentication; we simulate the
      // intent and return actionable guidance.
      const result = {
        status: "alert_configured",
        alert_id: `alert_${Date.now()}`,
        trip_type: params.trip_type,
        destination: params.destination,
        origin: params.origin,
        travel_date: params.travel_date,
        target_price_usd: params.target_price,
        notification_email: params.email,
        instructions: [
          "1. Open the Hopper app (iOS or Android) or visit hopper.com",
          `2. Search for ${params.trip_type === "flight" ? `flights from ${params.origin} to ${params.destination}` : `hotels in ${params.destination}`} on ${params.travel_date}`,
          "3. Tap the 'Watch' button (the rabbit icon) to enable price tracking",
          "4. Hopper will notify you when prices drop to your target or when it's the best time to book",
        ],
        hopper_app_url: "https://www.hopper.com/app",
        note: "Hopper's price alerts require a free account. The app uses AI to predict the best time to book with up to 95% accuracy.",
        created_at: new Date().toISOString(),
      };
  • src/index.ts:642-648 (registration)
    Registration of the set_price_alert tool, including its description and schema.
    name: "set_price_alert",
    description:
      "Create a price drop alert for a flight or hotel. Hopper will notify via the app/email when prices hit your target or when the optimal booking window opens.",
    inputSchema: {
      type: "object",
      properties: {
        trip_type: { type: "string", enum: ["flight", "hotel"], description: "Type of travel to watch" },
Behavior4/5

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

With no annotations provided, the description carries the full burden and successfully explains the asynchronous notification behavior ('Hopper will notify via the app/email when...'). It clarifies trigger conditions (target price hit or optimal window opening) but omits alert persistence duration, cancellation methods, and authentication requirements.

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?

Two well-structured sentences with zero waste: first states the action and scope, second explains the behavioral outcome. Information is front-loaded with the core purpose immediately clear.

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

Completeness4/5

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

Given the straightforward parameter schema (flat structure, 100% coverage) and lack of output schema, the description adequately covers the core user journey. It could improve by noting the optional nature of 'origin' for flight alerts or what the tool returns upon creation, but it sufficiently explains the value proposition and operational flow.

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%, establishing a baseline of 3. The description adds context by mentioning 'Hopper' and the notification mechanism but does not expand on parameter semantics beyond what the schema already provides (e.g., doesn't clarify that 'origin' is optional despite being a flight parameter, or explain the IATA code format constraints).

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 opens with a specific verb ('Create') and clear resource ('price drop alert'), explicitly scoping to 'flight or hotel' which distinguishes it from sibling booking tools (book_flight, book_hotel) and search tools.

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?

While the description explains the tool's function, it lacks explicit guidance on when to use this versus immediate booking (book_flight/hotel) or checking forecasts (get_price_forecast). Usage is implied ('wait for price drops') but no prerequisites or alternative comparisons are stated.

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/markswendsen-code/mcp-hopper'

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