@siva-sub/mcp-public-transport
Version:
A Model Context Protocol server for Singapore transport data with real-time information and routing
17 lines (16 loc) • 562 B
TypeScript
export interface ToolDefinition {
name: string;
description: string;
inputSchema: {
type: 'object';
properties: Record<string, any>;
required?: string[];
};
}
export declare abstract class BaseTool {
abstract getDefinitions(): ToolDefinition[];
abstract canHandle(toolName: string): boolean;
abstract execute(toolName: string, args: unknown): Promise<any>;
protected createSchema(properties: Record<string, any>, required?: string[]): any;
protected formatError(error: Error, toolName: string): any;
}