import { ToolHandler, ToolResult } from '../types/index.js';
export class EchoTool implements ToolHandler {
async execute(args: Record<string, any>): Promise<ToolResult> {
return {
content: [
{
type: 'text',
text: `Echo: ${args.text}`,
},
],
};
}
}
export class AddNumbersTool implements ToolHandler {
async execute(args: Record<string, any>): Promise<ToolResult> {
const sum = (args.a as number) + (args.b as number);
return {
content: [
{
type: 'text',
text: `${args.a} + ${args.b} = ${sum}`,
},
],
};
}
}
export class GetCurrentTimeTool implements ToolHandler {
async execute(): Promise<ToolResult> {
const now = new Date().toISOString();
return {
content: [
{
type: 'text',
text: `Current time: ${now}`,
},
],
};
}
}
// Export FlightStatusTool from separate file
export { FlightStatusTool } from './flight-status.js';