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"),
    },
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It describes the tool as retrieving comprehensive details, which implies a read-only operation, but doesn't explicitly state whether it's safe, requires authentication, has rate limits, or what the response format includes. It adds some context about the depth of information but lacks behavioral specifics like error handling or performance.

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 front-loaded with the core purpose in the first sentence, followed by elaboration and usage guidelines. Every sentence earns its place by adding value—contrasting with search results and specifying when to use it—without redundancy or unnecessary details. It's appropriately sized for the tool's complexity.

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 tool's moderate complexity (2 parameters, no output schema, no annotations), the description is fairly complete. It covers purpose, usage, and scope of information returned. However, it lacks details on behavioral aspects like error cases or response structure, which would be helpful since no output schema is provided. It's sufficient but could be more comprehensive.

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%, so the schema already documents both parameters (hotel_id and session_id) adequately. The description doesn't add any additional meaning beyond what the schema provides, such as explaining why session_id is required or how hotel_id should be sourced. Baseline 3 is appropriate when the schema does the heavy lifting.

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 verb ('Retrieve comprehensive details') and resource ('about a specific hotel identified by its ID'), distinguishing it from siblings like search-hotels (which finds hotels) and get-facilities (which focuses on amenities). It explicitly contrasts with search results, establishing its unique role in providing deeper information.

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

Usage Guidelines5/5

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

The description explicitly states when to 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.' This gives clear context and distinguishes it from alternatives like search-hotels (for initial searches) or book-hotel (for booking).

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

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