create-upnify-reminder
Schedule reminders in Upnify agenda by providing subject, description, and start date. Supports weather and CRM integration for streamlined task management.
Instructions
Create a new reminder in Upnify agenda
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asunto | Yes | Subject/title of the reminder | |
| descripcion | Yes | Description or details of the reminder | |
| fechaInicio | Yes | Start date and time in format YYYY-MM-DD HH:mm (e.g., "2025-07-26 05:00") |
Implementation Reference
- handlers/utilities.ts:8-57 (handler)Executes the tool by authenticating with Upnify, constructing the reminder payload, and sending a POST request to the reminders endpoint.async createReminder(tkIntegracion: string, reminderData: ReminderData) { try { const { token, userInfo } = await this.auth.getTokenAndUserInfo(tkIntegracion); const upnifyPayload = { key: "tkCarpeta", tipoCarpeta: "1", tkOportunidad: "", asunto: reminderData.asunto || "", gmt: "10", tkProspecto: "", search_terms: "", descripcion: reminderData.descripcion || "", idTipoPendiente: "1", frecuencia: "", recurrencia: "1", terminar: "0", diasMes: "1", diasRecurrencia: "", fechaInicio: reminderData.fechaInicio || "" }; const response = await fetch(`${API_URLS.UPNIFY_BASE}${ENDPOINTS.REMINDERS}`, { method: 'POST', headers: { 'token': token, 'Content-Type': 'application/json', }, body: JSON.stringify(upnifyPayload) }); if (!response.ok) { const errorText = await response.text(); console.error('Payload enviado:', JSON.stringify(upnifyPayload, null, 2)); console.error('Token usado:', token); console.error('Respuesta del servidor:', errorText); throw new Error(`Error al crear recordatorio: ${response.status} ${response.statusText}. ${errorText}`); } const result = await response.json(); return { success: true, message: 'Recordatorio agendado exitosamente', data: result, tkEmpresa: userInfo.tkEmpresa }; } catch (error) { throw new Error(`Error al agendar recordatorio en Upnify: ${error instanceof Error ? error.message : error}`); } }
- main.ts:181-202 (schema)Input schema for the tool as registered in the list_tools handler.{ name: 'create-upnify-reminder', description: 'Create a new reminder in Upnify agenda', inputSchema: { type: 'object', properties: { asunto: { type: 'string', description: 'Subject/title of the reminder' }, descripcion: { type: 'string', description: 'Description or details of the reminder' }, fechaInicio: { type: 'string', description: 'Start date and time in format YYYY-MM-DD HH:mm (e.g., "2025-07-26 05:00")' } }, required: ['asunto', 'descripcion', 'fechaInicio'] } },
- main.ts:406-425 (registration)Registration in call_tool handler that validates inputs and delegates to the UtilitiesHandler.createReminder method.} else if (name === 'create-upnify-reminder') { const { asunto, descripcion, fechaInicio } = args as any; if (!asunto || !descripcion || !fechaInicio) { return createErrorResponse( new Error('Se requieren todos los parámetros: asunto, descripcion, fechaInicio'), 'Validación de parámetros' ); } try { const result = await utilitiesHandler.createReminder(tkIntegracion, { asunto, descripcion, fechaInicio }); return createSuccessResponse({ success: true, message: 'Recordatorio agendado exitosamente en Upnify', reminder: { asunto, descripcion, fechaInicio }, data: result.data }); } catch (error) { return createErrorResponse(error, 'Error al agendar recordatorio en Upnify'); }
- types/interfaces.ts:62-66 (schema)TypeScript interface defining the structure of reminder input data, used by the handler.export interface ReminderData { asunto: string; descripcion: string; fechaInicio: string; }
- Input schema in the Python MCP server implementation (note: handler is a TODO stub).Tool( name="create-upnify-reminder", description="Create a new reminder in Upnify agenda", inputSchema={ "type": "object", "properties": { "asunto": {"type": "string", "description": "Subject/title of the reminder"}, "descripcion": {"type": "string", "description": "Description or details of the reminder"}, "fechaInicio": {"type": "string", "description": "Start date and time in format YYYY-MM-DD HH:mm (e.g., \"2025-07-26 05:00\")"} }, "required": ["asunto", "descripcion", "fechaInicio"] } )