import type { ToolDefinition } from '@allternit/sdk/ai-runtime/tools';
const weatherTool: ToolDefinition = {
name: 'weather',
description: 'Get the current weather for a city',
input_schema: {
type: 'object',
properties: {
city: { type: 'string', description: 'City name' },
units: { type: 'string', enum: ['metric', 'imperial'] }
},
required: ['city']
},
execute: async (args: { city: string; units?: string }) => {
const { city, units = 'metric' } = args;
return { city, temperature: 22, units, condition: 'sunny' };
}
};