Skip to main content
Glama
dumyCq

Jinko Hotel Booking MCP Server

by dumyCq

load-more-hotels

Retrieve the next batch of hotel results from a previous search using the session_id. This tool extends pagination to fetch additional properties with consistent formatting and details, indicating if more data is available.

Instructions

Retrieve additional hotel results from a previous search using the session_id. This tool continues pagination from a previous search-hotels request, returning the next batch of hotels with the same format and details as the original search.

The response format matches search-hotels and includes information about whether further pagination is possible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesSession ID from a previous search-hotels or load-more-hotels response

Implementation Reference

  • The loadMoreHotels function that executes the tool logic: API call to load more hotels by session_id, processes results, stores in session state, formats summaries, constructs response message indicating if more available.
    export async function loadMoreHotels(params: {
      session_id: string;
    }) {
      const metrics = getMetrics();
    
      // Make API request to load more hotels
      const availabilityResult = await makeApiRequest<any>(
        "/api/v1/hotels/availability/load_more",
        "POST",
        { session_id: params.session_id }
      );
    
      if (!availabilityResult) {
        return createYamlResponse({
          status: "error",
          message: "Failed to retrieve hotel availability data. Please try again later."
        });
      }
    
      const { session_id=null, has_more=false, hotels = [], total = 0 } = availabilityResult;
    
      // Record hotel search results count for load more
      metrics.recordHotelSearchResults(hotels.length);
    
      if (hotels.length === 0) {
        return createYamlResponse({
          status: "empty",
          message: "No hotels found matching your criteria. Please try different search parameters."
        });
      }
    
      // Store hotels in session for later retrieval
      hotels.forEach((hotel: Hotel) => {
        session.hotels[hotel.id.toString()] = hotel;
      });
    
      // Format results for response
      const hotelSummaries = hotels.map((hotel: Hotel) => formatHotelToSummaryObject(hotel));
    
      var message = `Retrieved ${hotels.length} additional hotels matching the search criteria.`;
      if (has_more) {
        message = message + " More hotels are still available. You can continue to load additional options with the load-more-hotels tool if the current selection doesn't satisfy the user's requirements."
      } else {
        message = message + " You have now retrieved all available hotels matching these search criteria. If the user requires more options, suggest modifying their search parameters such as dates, location, or amenity requirements."
      }
    
      return createYamlResponse({
        status: "success",
        total_hotels: total,
        hotels: hotelSummaries,
        session_id: session_id,
        message: message,
      });
    }
  • Registers the 'load-more-hotels' tool with MCP server, including description, input schema, and wraps the handler with telemetry.
    server.tool(
      "load-more-hotels",
      `Retrieve additional hotel results from a previous search using the session_id.
    This tool continues pagination from a previous search-hotels request, returning the next 
    batch of hotels with the same format and details as the original search.
    
    The response format matches search-hotels and includes information about whether 
    further pagination is possible.
    `,
      {
        session_id: z.string().describe("Session ID from a previous search-hotels or load-more-hotels response"),
      },
      getTelemetry().telemetryMiddleware.instrumentTool("load-more-hotels", loadMoreHotels)
    )
  • Zod input schema for the tool: requires session_id string from previous search.
    {
      session_id: z.string().describe("Session ID from a previous search-hotels or load-more-hotels response"),
    },
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. It discloses key behavioral traits: it's a read operation (implied by 'retrieve'), returns results in batches, maintains format consistency with search-hotels, and indicates pagination status. However, it doesn't mention rate limits, authentication needs, or error conditions.

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 supporting details. Every sentence adds value: explaining pagination continuation, response format consistency, and pagination status indication. No wasted words.

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?

For a pagination tool with 1 parameter, 100% schema coverage, and no output schema, the description is largely complete. It explains the tool's purpose, usage context, and response behavior. However, it could benefit from mentioning error handling (e.g., invalid session_id) or performance considerations.

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

Parameters4/5

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

The schema description coverage is 100%, so the schema already documents the single parameter. The description adds context by explaining that session_id comes from 'a previous search-hotels or load-more-hotels response,' which clarifies the parameter's origin and purpose beyond the schema's basic description.

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's purpose: 'Retrieve additional hotel results from a previous search using the session_id' and 'continues pagination from a previous search-hotels request.' It distinguishes itself from sibling tools like 'search-hotels' by specifying it's for pagination continuation rather than initial search.

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: 'from a previous search-hotels request' and 'continues pagination.' It also references the alternative 'search-hotels' for initial searches, providing clear guidance on tool selection.

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