diff --git a/src/tools/routines.ts b/src/tools/routines.ts index a791a49..eb4d10b 100644 --- a/src/tools/routines.ts +++ b/src/tools/routines.ts @@ -101,15 +101,19 @@ export const routineTools: PaperclipTool[] = [ }, { name: 'create_routine_trigger', - description: 'Criar um gatilho para uma rotina', + description: 'Criar um gatilho para uma rotina. Para schedule passar kind="schedule" + schedule={cron,tz} + enabled + label.', inputSchema: { type: 'object', properties: { routine_id: { type: 'string', description: 'ID da rotina' }, - type: { type: 'string', description: 'Tipo de gatilho' }, - config: { type: 'object', description: 'Configuracao do gatilho' }, + kind: { type: 'string', description: 'schedule|webhook|api', enum: ['schedule', 'webhook', 'api'] }, + cronExpression: { type: 'string', description: 'Para kind=schedule: cron 5-field (ex: "0 9 * * 1")' }, + timezone: { type: 'string', description: 'Para kind=schedule: ex Europe/Lisbon' }, + webhookSecret: { type: 'string', description: 'Para kind=webhook' }, + enabled: { type: 'boolean', description: 'Estado activo (default true)' }, + label: { type: 'string', description: 'Label legivel' }, }, - required: ['routine_id'], + required: ['routine_id', 'kind'], }, handler: async (args) => { const { routine_id, ...body } = args as { routine_id: string; [k: string]: unknown };