import { SkillBase, FunctionResult, type SkillToolDefinition } from '@signalwire/sdk';
class WeatherSkill extends SkillBase {
static override SKILL_NAME = 'weather';
static override SKILL_DESCRIPTION = 'Look up the weather.';
override getTools(): SkillToolDefinition[] {
return [{
name: 'get_weather',
description: 'Get the weather.',
parameters: { type: 'object', properties: {} },
handler: () => {
const namespace = this.getSkillNamespace();
console.log(namespace); // e.g., "skill:weather"
return new FunctionResult('Sunny.');
},
}];
}
}