UNPKG

@siva-sub/mcp-public-transport

Version:

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

48 lines (47 loc) 1.35 kB
/** * MRT Exit Service * Provides MRT station exit information for precise navigation */ import { CacheService } from './cache.js'; export interface MRTExit { stationName: string; exitCode: string; coordinates: { latitude: number; longitude: number; }; distance?: number; } export interface MRTExitRecommendation { stationName: string; recommendedExit: MRTExit; alternativeExits: MRTExit[]; walkingDistance: number; walkingTime: number; reason: string; } export declare class MRTExitService { private cache; private mrtExitData; private dataLoaded; constructor(cache: CacheService); /** * Load MRT exit data from Singapore's open data */ loadMRTExitData(): Promise<void>; /** * Find the best MRT exit for a destination */ findBestMRTExit(stationName: string, destinationLat: number, destinationLng: number): Promise<MRTExitRecommendation | null>; /** * Get all exits for a specific station */ getStationExits(stationName: string): Promise<MRTExit[]>; /** * Find nearby MRT exits within a radius */ findNearbyMRTExits(latitude: number, longitude: number, radiusMeters?: number): Promise<MRTExit[]>; private normalizeStationName; private calculateDistance; private generateExitReason; }