Skip to main content
Glama
dumyCq

Jinko Hotel Booking MCP Server

by dumyCq

get-hotel-details

Retrieve complete hotel details, including room types, rates, amenities, and cancellation policies, for a specific hotel ID. Use this to provide users with all booking options and essential information.

Instructions

Retrieve comprehensive details about a specific hotel identified by its ID. This tool provides more extensive information than what's available in search results, including complete descriptions, all available room types, detailed rate information, cancellation policies, and full amenity lists.

Use this tool when a user expresses interest in a specific hotel from search results to provide them with all available options and complete booking information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hotel_idYesID of the hotel to get details for
session_idYesThe session ID from a previous search

Implementation Reference

  • The handler function that implements the core logic of the 'get-hotel-details' tool. It fetches detailed hotel data from the API endpoint `/api/v1/hotels/availability/{session_id}/{hotel_id}` and formats it into a YAML response.
    export async function getHotelDetails(params: { session_id: string, hotel_id: string }) { // Make API request to load more hotels const hotelAvailability = await makeApiRequest<any>( `/api/v1/hotels/availability/${params.session_id}/${params.hotel_id}`, "GET", ); const hotelDetail = formatHotelToDetailObject(hotelAvailability); const message = "This response contains comprehensive details about the selected hotel, including all available room types, rate options, amenities, policies, and location information. Present the key details to the user and help them compare different rate options if they're considering booking this hotel." return createYamlResponse({ status: "success", hotel: hotelDetail, session_id: params.session_id, message: message, }); }
  • Registration of the 'get-hotel-details' tool on the MCP server, including the tool name, description, input schema validation using Zod, and reference to the instrumented handler function.
    server.tool( "get-hotel-details", `Retrieve comprehensive details about a specific hotel identified by its ID. This tool provides more extensive information than what's available in search results, including complete descriptions, all available room types, detailed rate information, cancellation policies, and full amenity lists. Use this tool when a user expresses interest in a specific hotel from search results to provide them with all available options and complete booking information. `, { session_id: z.string().describe("The session ID from a previous search"), hotel_id: z.string().describe("ID of the hotel to get details for"), }, getTelemetry().telemetryMiddleware.instrumentTool("get-hotel-details", getHotelDetails) );
  • Input schema for the 'get-hotel-details' tool defined using Zod for parameter validation.
    { session_id: z.string().describe("The session ID from a previous search"), hotel_id: z.string().describe("ID of the hotel to get details for"), },

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/dumyCq/jinko-mcp'

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