Skip to main content
Glama
dumyCq

Jinko Hotel Booking MCP Server

by dumyCq

find-place

Convert location queries into precise coordinates for hotel searches. Accepts city names, landmarks, or hotel descriptions and returns standardized place information with latitude and longitude.

Instructions

Use this tool to convert a user's location query into standardized place information with coordinates. This is essential when you need latitude and longitude for hotel searches but only have a text description. The tool accepts city names, hotel names, landmarks, or other location identifiers and returns a list of matching places with their details and precise coordinates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoLanguage for the place searchen
queryYesUser's input for place search

Implementation Reference

  • The 'autocompletePlaces' function is the core handler for the 'find-place' tool. It sends the user's query to a places autocomplete API, processes the results into structured place summaries with latitude/longitude coordinates, and returns a YAML-formatted response.
    export async function autocompletePlaces(params: { query: string; language?: string }) {
      // Make API request to get place suggestions
      const request = {
        "input": params.query,
        "language": "en",
      };
    
      if (params.language) {
        request.language = params.language;
      }
    
      const autocompleteResult = await makeApiRequest<any>(
        "/api/v1/hotels/places/autocomplete",
        "POST",
        request,
      );
    
      if (!autocompleteResult) {
        return createYamlResponse({
          status: "error",
          message: "Failed to retrieve place suggestions. Please try again with a different query."
        });
      }
    
      if (!autocompleteResult.predictions || autocompleteResult.predictions.length === 0) {
        return createYamlResponse({
          status: "empty",
          message: "No places found matching your query. Please try a different search term."
        });
      }
    
      // Format results for YAML response
      const placeSummaries = autocompleteResult.predictions.map((place: PlaceSuggestion, index: number) => ({
        id: place.place_id,
        name: place.structured_formatting?.main_text || place.description,
        type: place.types || "Unknown",
        location: place.description || "",
        latitude: place.latitude,
        longitude: place.longitude,
      }));
    
      const response: PlaceSummaryResponse = {
        places: placeSummaries,
        count: autocompleteResult.predictions.length,
        message: "Found matching locations based on your search. Each result includes location coordinates that can be used with the search-hotels tool. If multiple locations match your query, please help the user select the most appropriate one based on their travel plans."
      };
    
      return createYamlResponse(response);
    }
  • Registers the 'find-place' tool with the MCP server, providing a detailed description, Zod input schema for 'query' and optional 'language', and the telemetry-instrumented 'autocompletePlaces' handler function.
    server.tool(
      "find-place",
      `Use this tool to convert a user's location query into standardized place information with coordinates.
    This is essential when you need latitude and longitude for hotel searches but only have a text description.
    The tool accepts city names, hotel names, landmarks, or other location identifiers and returns a list of 
    matching places with their details and precise coordinates.
    `,
    {
      query: z.string().describe("User's input for place search"),
      language: z.string().optional().default("en").describe("Language for the place search"),
    },
    getTelemetry().telemetryMiddleware.instrumentTool("find-place", autocompletePlaces)
    );
  • Zod schema defining the input parameters for the 'find-place' tool: required 'query' string and optional 'language' string defaulting to 'en'.
      query: z.string().describe("User's input for place search"),
      language: z.string().optional().default("en").describe("Language for the place search"),
    },
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's behavior well: it accepts various location identifiers and returns a list of matching places with details and coordinates. However, it doesn't mention potential limitations like rate limits, authentication needs, or error conditions, which would be helpful for a tool with no annotation coverage.

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 appropriately sized and front-loaded. The first sentence states the core purpose, followed by context and details. Every sentence adds value without redundancy, making it efficient and easy to understand.

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 explains the purpose, usage context, input types, and output format. However, without an output schema, it could benefit from more details about the return structure (e.g., what 'details' include), but it adequately covers the essentials for an agent to use it correctly.

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 thoroughly. The description adds some context by mentioning what types of queries are accepted (city names, hotel names, landmarks), but doesn't provide additional syntax or format details beyond what the schema provides. 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 tool's purpose: converting location queries into standardized place information with coordinates. It specifies the verb 'convert' and resource 'user's location query', and distinguishes it from sibling tools like 'search-hotels' by explaining this is for getting coordinates needed for hotel searches, not for searching hotels directly.

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 you need latitude and longitude for hotel searches but only have a text description.' It provides a clear context and distinguishes from alternatives by implying this is a prerequisite step before using hotel-related tools like 'search-hotels'.

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