jotae-mcp 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +19 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -139,12 +139,12 @@ const TOOLS = [
139
139
  channel: { type: 'string', enum: ['whatsapp', 'email'] },
140
140
  trigger: { type: 'string', enum: ['registration', 'event_start', 'event_end', 'attended', 'no_show', 'watched_pitch', 'clicked_cta', 'purchased', 'scheduled'] },
141
141
  delay_minutes: { type: 'number', description: 'Minutos após o gatilho (negativo = antes)' },
142
- template_id: { type: 'string', description: 'ID do template WhatsApp' },
143
- broadcast_template_id: { type: 'string', description: 'ID do template de e-mail' },
144
- send_time: { type: 'string', description: 'Ancora horário HH:MM (ex: "08:00")' },
145
- scheduled_at: { type: 'string', description: 'Data/hora absoluta ISO 8601 (para trigger=scheduled)' },
146
- audience_list_id: { type: 'string', description: 'ID da lista de destinatários' },
147
- exclude_list_id: { type: 'string', description: 'ID da lista de exclusão' },
142
+ template_id: { type: 'string', description: 'ID do template (WhatsApp ou e-mail — mesmo campo para ambos)' },
143
+ destination: { type: 'string', enum: ['individual', 'group'], description: 'WhatsApp: individual (padrão) ou group' },
144
+ group_id: { type: 'string', description: 'ID do grupo WhatsApp (quando destination=group)' },
145
+ scheduled_at: { type: 'string', description: 'ISO 8601 obrigatório quando trigger=scheduled' },
146
+ audience_list_id: { type: 'string', description: 'ID da lista de destinatários (filtra quem recebe)' },
147
+ exclude_list_id: { type: 'string', description: 'ID da lista de exclusão (quem não recebe)' },
148
148
  },
149
149
  required: ['event_id', 'channel', 'trigger'],
150
150
  },
@@ -157,9 +157,15 @@ const TOOLS = [
157
157
  properties: {
158
158
  automation_id: { type: 'string' },
159
159
  label: { type: 'string' },
160
+ channel: { type: 'string', enum: ['whatsapp', 'email'] },
161
+ trigger: { type: 'string' },
160
162
  delay_minutes: { type: 'number' },
161
- send_time: { type: 'string' },
163
+ template_id: { type: 'string' },
164
+ destination: { type: 'string', enum: ['individual', 'group'] },
165
+ group_id: { type: 'string' },
162
166
  scheduled_at: { type: 'string' },
167
+ audience_list_id: { type: 'string' },
168
+ exclude_list_id: { type: 'string' },
163
169
  active: { type: 'boolean' },
164
170
  },
165
171
  required: ['automation_id'],
@@ -364,9 +370,13 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (req) => {
364
370
  case 'list_automations':
365
371
  result = await api('GET', `/automations${a.event_id ? `?event_id=${a.event_id}` : ''}`);
366
372
  break;
367
- case 'create_automation':
368
- result = await api('POST', '/automations', a);
373
+ case 'create_automation': {
374
+ // send_time e broadcast_template_id não existem na tabela whatsapp_automations
375
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
376
+ const { broadcast_template_id: _b, send_time: _s, ...autoBody } = a;
377
+ result = await api('POST', '/automations', autoBody);
369
378
  break;
379
+ }
370
380
  case 'update_automation': {
371
381
  const { automation_id, ...patch } = a;
372
382
  result = await api('PATCH', `/automations/${automation_id}`, patch);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jotae-mcp",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "MCP Server para o Jotae — cria eventos, configura automações e lê métricas via Claude",
5
5
  "main": "dist/index.js",
6
6
  "bin": {