mirlo-mcp 1.0.1 → 1.0.2

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.
package/dist/client.d.ts CHANGED
@@ -24,6 +24,7 @@ export declare class MirloClient {
24
24
  getTicket(id: string): Promise<any>;
25
25
  createTicket(data: Record<string, unknown>): Promise<any>;
26
26
  updateTicket(id: string, data: Record<string, unknown>): Promise<any>;
27
+ addTicketNote(ticketId: string, data: Record<string, unknown>): Promise<any>;
27
28
  listTasks(filters?: Record<string, string>): Promise<any>;
28
29
  createTask(data: Record<string, unknown>): Promise<any>;
29
30
  completeTask(id: string): Promise<any>;
package/dist/client.js CHANGED
@@ -86,6 +86,9 @@ export class MirloClient {
86
86
  async updateTicket(id, data) {
87
87
  return this.request('PATCH', `/crm/tickets/${id}`, data);
88
88
  }
89
+ async addTicketNote(ticketId, data) {
90
+ return this.request('POST', `/crm/tickets/${ticketId}/notes`, data);
91
+ }
89
92
  // ── CRM: Tasks ──
90
93
  async listTasks(filters) {
91
94
  const params = filters ? '?' + new URLSearchParams(filters).toString() : '';
package/dist/tools.js CHANGED
@@ -175,6 +175,20 @@ const createTicket = {
175
175
  }),
176
176
  handler: async (client, args) => client.createTicket({ ...args, source: 'api' }),
177
177
  };
178
+ const addTicketNote = {
179
+ name: 'mirlo_add_ticket_note',
180
+ description: 'Add a comment/note to a ticket. Can be internal or public (visible to customer).',
181
+ schema: z.object({
182
+ ticket_id: z.string().describe('Ticket UUID'),
183
+ body: z.string().describe('Note content (text or HTML)'),
184
+ is_public: z.boolean().optional().default(false).describe('true = visible to customer on public ticket page'),
185
+ author_member_id: z.string().optional().describe('Author member UUID (if omitted, uses API key owner)'),
186
+ }),
187
+ handler: async (client, args) => {
188
+ const { ticket_id, body, is_public, author_member_id } = args;
189
+ return client.addTicketNote(ticket_id, { body_html: body, is_public, author_member_id: author_member_id || 'system' });
190
+ },
191
+ };
178
192
  // ── CRM: Tasks ──
179
193
  const listTasks = {
180
194
  name: 'mirlo_list_tasks',
@@ -279,7 +293,7 @@ export const ALL_TOOLS = [
279
293
  listDeals, getDeal, createDeal, updateDeal, moveDealStage,
280
294
  listContacts, getContact, createContact,
281
295
  listAccounts, createAccount,
282
- listTickets, createTicket,
296
+ listTickets, createTicket, addTicketNote,
283
297
  listTasks, createTask, completeTask,
284
298
  listPipelines,
285
299
  // Messaging
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mirlo-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Mirlo MCP Server — CRM, Messaging & Voice tools for Claude, GPT, and other LLMs",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/client.ts CHANGED
@@ -114,6 +114,10 @@ export class MirloClient {
114
114
  return this.request<any>('PATCH', `/crm/tickets/${id}`, data);
115
115
  }
116
116
 
117
+ async addTicketNote(ticketId: string, data: Record<string, unknown>) {
118
+ return this.request<any>('POST', `/crm/tickets/${ticketId}/notes`, data);
119
+ }
120
+
117
121
  // ── CRM: Tasks ──
118
122
 
119
123
  async listTasks(filters?: Record<string, string>) {
package/src/tools.ts CHANGED
@@ -203,6 +203,21 @@ const createTicket: ToolDef = {
203
203
  handler: async (client, args) => client.createTicket({ ...args, source: 'api' }),
204
204
  };
205
205
 
206
+ const addTicketNote: ToolDef = {
207
+ name: 'mirlo_add_ticket_note',
208
+ description: 'Add a comment/note to a ticket. Can be internal or public (visible to customer).',
209
+ schema: z.object({
210
+ ticket_id: z.string().describe('Ticket UUID'),
211
+ body: z.string().describe('Note content (text or HTML)'),
212
+ is_public: z.boolean().optional().default(false).describe('true = visible to customer on public ticket page'),
213
+ author_member_id: z.string().optional().describe('Author member UUID (if omitted, uses API key owner)'),
214
+ }),
215
+ handler: async (client, args) => {
216
+ const { ticket_id, body, is_public, author_member_id } = args;
217
+ return client.addTicketNote(ticket_id, { body_html: body, is_public, author_member_id: author_member_id || 'system' });
218
+ },
219
+ };
220
+
206
221
  // ── CRM: Tasks ──
207
222
 
208
223
  const listTasks: ToolDef = {
@@ -321,7 +336,7 @@ export const ALL_TOOLS: ToolDef[] = [
321
336
  listDeals, getDeal, createDeal, updateDeal, moveDealStage,
322
337
  listContacts, getContact, createContact,
323
338
  listAccounts, createAccount,
324
- listTickets, createTicket,
339
+ listTickets, createTicket, addTicketNote,
325
340
  listTasks, createTask, completeTask,
326
341
  listPipelines,
327
342
  // Messaging