mirlo-mcp 1.0.0 → 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
@@ -168,10 +168,27 @@ const createTicket = {
168
168
  title: z.string().describe('Ticket title'),
169
169
  body_html: z.string().optional().describe('Ticket description'),
170
170
  priority: z.enum(['low', 'normal', 'high', 'urgent']).optional().default('normal'),
171
+ project_id: z.string().optional().describe('Project UUID — determines ticket prefix (e.g. WOZ, SOT). List projects via mirlo_list_tickets to see available project_ids.'),
171
172
  owner_id: z.string().optional().describe('Assignee member UUID'),
173
+ requester_id: z.string().optional().describe('Contact UUID of the requester'),
174
+ account_id: z.string().optional().describe('Account UUID'),
172
175
  }),
173
176
  handler: async (client, args) => client.createTicket({ ...args, source: 'api' }),
174
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
+ };
175
192
  // ── CRM: Tasks ──
176
193
  const listTasks = {
177
194
  name: 'mirlo_list_tasks',
@@ -276,7 +293,7 @@ export const ALL_TOOLS = [
276
293
  listDeals, getDeal, createDeal, updateDeal, moveDealStage,
277
294
  listContacts, getContact, createContact,
278
295
  listAccounts, createAccount,
279
- listTickets, createTicket,
296
+ listTickets, createTicket, addTicketNote,
280
297
  listTasks, createTask, completeTask,
281
298
  listPipelines,
282
299
  // Messaging
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mirlo-mcp",
3
- "version": "1.0.0",
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
@@ -195,11 +195,29 @@ const createTicket: ToolDef = {
195
195
  title: z.string().describe('Ticket title'),
196
196
  body_html: z.string().optional().describe('Ticket description'),
197
197
  priority: z.enum(['low', 'normal', 'high', 'urgent']).optional().default('normal'),
198
+ project_id: z.string().optional().describe('Project UUID — determines ticket prefix (e.g. WOZ, SOT). List projects via mirlo_list_tickets to see available project_ids.'),
198
199
  owner_id: z.string().optional().describe('Assignee member UUID'),
200
+ requester_id: z.string().optional().describe('Contact UUID of the requester'),
201
+ account_id: z.string().optional().describe('Account UUID'),
199
202
  }),
200
203
  handler: async (client, args) => client.createTicket({ ...args, source: 'api' }),
201
204
  };
202
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
+
203
221
  // ── CRM: Tasks ──
204
222
 
205
223
  const listTasks: ToolDef = {
@@ -318,7 +336,7 @@ export const ALL_TOOLS: ToolDef[] = [
318
336
  listDeals, getDeal, createDeal, updateDeal, moveDealStage,
319
337
  listContacts, getContact, createContact,
320
338
  listAccounts, createAccount,
321
- listTickets, createTicket,
339
+ listTickets, createTicket, addTicketNote,
322
340
  listTasks, createTask, completeTask,
323
341
  listPipelines,
324
342
  // Messaging