UNPKG

@siva-sub/mcp-public-transport

Version:

A Model Context Protocol server for Singapore transport data with real-time information and routing

38 lines (37 loc) 1.24 kB
import { BaseTool, ToolDefinition } from '../base.js'; import { LTAService } from '../../services/lta.js'; import { OneMapService } from '../../services/onemap.js'; import { FuzzySearchService } from '../../services/fuzzySearch.js'; export interface EnhancedBusStopResult { busStopCode: string; description: string; roadName: string; latitude: number; longitude: number; matchScore: number; matchedFields: string[]; distanceMeters?: number; walkingTimeMinutes?: number; locationPatterns: { blockNumber?: string; direction?: string; amenityType?: string; }; searchContext: { queryVariations: string[]; bestMatch: string; }; } export declare class BusStopSearchTool extends BaseTool { private ltaService; private oneMapService; private fuzzySearchService; constructor(ltaService: LTAService, oneMapService: OneMapService, fuzzySearchService: FuzzySearchService); getDefinitions(): ToolDefinition[]; canHandle(toolName: string): boolean; execute(toolName: string, args: unknown): Promise<any>; private simpleSearch; private sortResults; private generateSearchSuggestions; private findCommonPatterns; }