@siva-sub/mcp-public-transport
Version:
A Model Context Protocol server for Singapore transport data with real-time information and routing
60 lines (59 loc) • 1.76 kB
TypeScript
/**
* Landmarks and Facilities Discovery Tool
* Uses OneMap Themes API to find landmarks, facilities, and points of interest
*/
import { BaseTool, ToolDefinition } from '../base.js';
import { ThemesService } from '../../services/themes.js';
import { OneMapService } from '../../services/onemap.js';
interface LandmarkSearchResponse {
success: boolean;
location: {
name: string;
coordinates: [number, number];
address?: string;
};
searchRadius: number;
results: Array<{
category: string;
theme: string;
facilities: Array<{
name: string;
description: string;
distance: number;
coordinates: [number, number];
category: string;
owner: string;
website?: string;
additionalInfo?: Record<string, any>;
}>;
totalCount: number;
}>;
summary: {
totalFacilities: number;
categoriesFound: string[];
nearestFacility?: {
name: string;
distance: number;
category: string;
};
};
metadata: {
searchTime: number;
apiCalls: number;
cacheHits: number;
};
}
export declare class LandmarksDiscoveryTool extends BaseTool {
private themesService;
private oneMapService;
constructor(themesService: ThemesService, oneMapService: OneMapService);
getDefinitions(): ToolDefinition[];
canHandle(toolName: string): boolean;
execute(toolName: string, args: unknown): Promise<LandmarkSearchResponse>;
private resolveLocation;
private formatSearchResults;
private extractAdditionalInfo;
private generateSummary;
private createErrorResponse;
}
export {};