tomtom-poi-search
Search for points of interest (POIs) by category, location, or specific filters like EV charging stations, fuel types, or brands. Retrieve detailed results with language, mapcodes, and geometry data for precise geolocation needs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| addressRanges | No | Include address ranges in the response | |
| brandSet | No | Filter by brand names. Examples: 'Starbucks,Peet\'s', 'Marriott,Hilton'. Use quotes for brands with commas. | |
| btmRight | No | Bottom-right coordinates of bounding box (format: 'lat,lon'). Must be used with topLeft | |
| categorySet | No | Filter by POI categories. Common IDs: '7315' (restaurants), '7309' (gas), '7311' (hotels), '9663' (EV charging). | |
| chargingAvailability | No | Include charging availability information for EV stations | |
| connectorSet | No | EV connector types: 'IEC62196Type2CableAttached', 'Chademo', 'TeslaConnector' | |
| countrySet | No | Limit results to specific countries using ISO codes. Examples: 'US', 'FR,GB', 'CA,US' | |
| entityTypeSet | No | Filter results by entity types | |
| ext | No | Extended parameters for the search | |
| extendedPostalCodesFor | No | Include extended postal codes for specific index types. Examples: 'PAD', 'PAD,Addr', 'POI' | |
| fuelAvailability | No | Include fuel availability information for gas stations | |
| fuelSet | No | Fuel types: 'Petrol', 'Diesel', 'LPG', 'Hydrogen', 'E85' | |
| geometries | No | Include geometries information in the response | |
| language | No | Preferred language for results using IETF language tags. Examples: 'en-US', 'fr-FR', 'de-DE', 'es-ES' | |
| lat | No | Latitude for location context. STRONGLY recommended for relevant local results. | |
| limit | No | Maximum number of results to return (1-100). Default: 5 | |
| lon | No | Longitude for location context. Must be used with lat parameter. | |
| mapcodes | No | Include mapcode information in the response. Mapcodes represent specific locations within a few meters and are designed to be short, easy to recognize and communicate. Options: Local, International, Alternative. Examples: 'Local' (local mapcode only), 'Local,Alternative' (multiple types). Accepts array of string(s). | |
| maxFuzzyLevel | No | Maximum fuzzy matching level (1-4) | |
| maxPowerKW | No | Maximum charging power in kW for EV stations | |
| minFuzzyLevel | No | Minimum fuzzy matching level (1-4) | |
| minPowerKW | No | Minimum charging power in kW for EV stations | |
| ofs | No | Offset for pagination of results | |
| openingHours | No | List of opening hours for a POI (Points of Interest).Value: `nextSevenDays` Mode shows the opening hours for next week, starting with the current day in the local time of the POI. Usage example: openingHours=nextSevenDays | |
| parkingAvailability | No | Include parking availability information | |
| query | Yes | Specific POI category search. Best for finding types of businesses: 'restaurants', 'gas stations', 'hotels', 'parking', 'ATMs', 'hospitals' | |
| radius | No | Search radius in meters. Essential for focused local results. Examples: 1000 (walking), 5000 (driving), 20000 (wide area). | |
| relatedPois | No | Include related points of interest | |
| roadUse | No | Include road usage information | |
| sort | No | Sort options for results | |
| timeZone | No | Used to indicate the mode in which the timeZone object should be returned. Values: iana Mode shows the IANA ID which allows the user to determine the current time zone for the POI. Usage examples: timeZone=iana | |
| topLeft | No | Top-left coordinates of bounding box (format: 'lat,lon'). Must be used with btmRight | |
| typeahead | No | Autocomplete mode for partial queries. Use for search interfaces. | |
| vehicleTypeSet | No | A comma-separated list of vehicle types that could be used to restrict the result to the Points Of Interest of specific vehicles. If vehicleTypeSet is specified, the query can remain empty. Only POIs with a proper vehicle type will be returned. Value: A comma-separated list of vehicle type identifiers (in any order). When multiple vehicles types are provided, only POIs that belong to (at least) one of the vehicle types from the provided list will be returned. Available vehicle types: Car , Truck | |
| view | No | Geopolitical view for disputed territories. Options: 'Unified', 'AR', 'IL', 'IN', 'MA', 'PK', 'RU', 'TR', 'CN' |
Implementation Reference
- src/handlers/searchHandler.ts:87-102 (handler)MCP tool handler factory for 'tomtom-poi-search'. Handles input parameters, calls the POI search service, logs activity, formats response as JSON text, and manages errors.export function createPoiSearchHandler() { return async (params: any) => { logger.info(`🏪 POI search: "${params.query}"`); try { const result = await poiSearch(params.query, params); logger.info(`✅ POI search completed`); return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { logger.error(`❌ POI search failed: ${error.message}`); return { content: [{ type: "text" as const, text: JSON.stringify({ error: error.message }) }], isError: true, }; } }; }
- Zod schema defining input parameters for the tomtom-poi-search tool, including query, location bias, filters, radius, and POI-specific options.export const tomtomPOISearchSchema = { query: z .string() .describe( "Name of the POI to search for. If the intended query is a POI category like 'restaurant', provide an empty string for this param and use the category filter parameter to apply the desired category filter." ), ...baseSearchParams, ...locationBiasParams, ...boundingBoxParams, ...poiFilterParams, radius: z .number() .optional() .describe( "Search radius in meters. Essential for focused local results. Examples: 1000 (walking), 5000 (driving), 20000 (wide area)." ), lat: z .number() .optional() .describe("Latitude for location context. STRONGLY recommended for relevant local results."), lon: z .number() .optional() .describe("Longitude for location context. Must be used with lat parameter."), typeahead: z .boolean() .optional() .describe("Autocomplete mode for partial queries. Use for search interfaces."), entityTypeSet: z.string().optional() .describe(`Filter results by geographic entity types. Valid values: PostalCodeArea, CountryTertiarySubdivision, CountrySecondarySubdivision, MunicipalitySubdivision, MunicipalitySecondarySubdivision, Country, CountrySubdivision, Neighbourhood, Municipality. Note: This parameter is for geographic entities only, not POIs. For POI filtering, use categorySet instead` ), chargingAvailability: z .boolean() .optional() .describe("Include charging availability information for EV stations"), parkingAvailability: z.boolean().optional().describe("Include parking availability information"), fuelAvailability: z .boolean() .optional() .describe("Include fuel availability information for gas stations"), minFuzzyLevel: z.number().optional().describe("Minimum fuzzy matching level (1-4)"), maxFuzzyLevel: z.number().optional().describe("Maximum fuzzy matching level (1-4)"), ofs: z.number().optional().describe("Offset for pagination of results"), relatedPois: z.string().optional().describe("Include related points of interest"), ext: z.string().optional().describe("Extended parameters for the search"), };
- src/tools/searchTools.ts:66-74 (registration)Registers the 'tomtom-poi-search' tool on the MCP server with title, description, input schema, and handler factory.server.registerTool( "tomtom-poi-search", { title: "TomTom POI Search", description: "Find specific business categories", inputSchema: schemas.tomtomPOISearchSchema, }, createPoiSearchHandler() );
- Core POI search function that constructs API parameters and calls the TomTom POI Search API endpoint.export async function poiSearch( query: string, options?: ExtendedSearchOptions ): Promise<SearchResult> { const params = buildSearchParams(options, { limit: 10, language: "en-US", }); return makeApiCall( `/search/${API_VERSION.SEARCH}/poiSearch/${encodeURIComponent(query)}.json`, params, `POI searching for: "${query}"` ); }