Skip to main content
Glama
GongRzhe

Travel Planner MCP Server

get_accommodations

Search for accommodation options in a specific location by providing check-in and check-out dates and an optional budget. Simplify travel planning with accurate lodging results.

Instructions

Searches for accommodation options in a specified location

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budgetNoMaximum price per night
checkInYesCheck-in date (YYYY-MM-DD)
checkOutYesCheck-out date (YYYY-MM-DD)
locationYesLocation to search

Implementation Reference

  • Handler function for get_accommodations tool that validates input using the schema and returns a mock formatted text response with accommodation details.
    case "get_accommodations": {
      const validatedArgs = GetAccommodationsSchema.parse(args);
      return {
        content: [
          {
            type: "text",
            text: `Accommodation options in ${validatedArgs.location}\n` +
                  `Dates: ${validatedArgs.checkIn} to ${validatedArgs.checkOut}\n` +
                  `Budget: ${validatedArgs.budget || "Not specified"} per night`,
          },
        ],
      };
    }
  • Zod schema defining the input parameters for the get_accommodations tool: location, check-in date, check-out date, and optional budget.
    const GetAccommodationsSchema = z.object({
      location: z.string().describe("Location to search"),
      checkIn: z.string().describe("Check-in date (YYYY-MM-DD)"),
      checkOut: z.string().describe("Check-out date (YYYY-MM-DD)"),
      budget: z.number().optional().describe("Maximum price per night"),
    });
  • index.ts:84-88 (registration)
    Registers the get_accommodations tool in the ListTools response, including name, description, and input schema.
    {
      name: "get_accommodations",
      description: "Searches for accommodation options in a specified location",
      inputSchema: zodToJsonSchema(GetAccommodationsSchema),
    },
Install Server

Other Tools

Related 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/GongRzhe/TRAVEL-PLANNER-MCP-Server'

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