@talkspresso/mcp-server 1.3.0 → 1.3.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.
@@ -1,10 +1,9 @@
1
1
  import { z } from 'zod';
2
+ import { formatMcpResponse } from '../client.js';
2
3
  export function registerTestimonialTools(server, client) {
3
4
  server.tool('list-testimonials', 'Get all your testimonials from clients. Use this when someone asks about reviews, social proof, or client feedback.', {}, async () => {
4
5
  const data = await client.get('/testimonial');
5
- return {
6
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
7
- };
6
+ return formatMcpResponse(data);
8
7
  });
9
8
  server.tool('create-testimonial', 'Manually add a testimonial from a client. Use this when you have offline feedback you want to add to your profile.', {
10
9
  author_name: z.string().describe('Name of the person giving the testimonial'),
@@ -13,42 +12,32 @@ export function registerTestimonialTools(server, client) {
13
12
  rating: z.number().optional().describe('Rating from 1-5 (default 5)'),
14
13
  }, async (params) => {
15
14
  const data = await client.post('/testimonial', params);
16
- return {
17
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
18
- };
15
+ return formatMcpResponse(data);
19
16
  });
20
17
  server.tool('request-testimonial', 'Send a testimonial request email to a client. They will receive a link to submit their testimonial. Use this after completing a successful session.', {
21
18
  client_id: z.string().describe('The client ID to request a testimonial from. Use list-clients to find this.'),
22
19
  appointment_id: z.string().optional().describe('Optional appointment ID to reference a specific session'),
23
20
  }, async (params) => {
24
21
  const data = await client.post('/testimonial/request', params);
25
- return {
26
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
27
- };
22
+ return formatMcpResponse(data);
28
23
  });
29
24
  server.tool('approve-testimonial', 'Approve a pending testimonial submitted by a client so it appears on your profile.', {
30
25
  id: z.string().describe('The testimonial ID to approve'),
31
26
  }, async (params) => {
32
27
  const data = await client.post(`/testimonial/${params.id}/approve`);
33
- return {
34
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
35
- };
28
+ return formatMcpResponse(data);
36
29
  });
37
30
  server.tool('reject-testimonial', 'Reject a pending testimonial so it does not appear on your profile.', {
38
31
  id: z.string().describe('The testimonial ID to reject'),
39
32
  }, async (params) => {
40
33
  const data = await client.post(`/testimonial/${params.id}/reject`);
41
- return {
42
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
43
- };
34
+ return formatMcpResponse(data);
44
35
  });
45
36
  server.tool('toggle-featured-testimonial', 'Toggle whether a testimonial is featured (highlighted) on your profile.', {
46
37
  id: z.string().describe('The testimonial ID to toggle featured status'),
47
38
  }, async (params) => {
48
39
  const data = await client.post(`/testimonial/${params.id}/toggle-featured`);
49
- return {
50
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
51
- };
40
+ return formatMcpResponse(data);
52
41
  });
53
42
  server.tool('update-testimonial', 'Update an existing testimonial (edit text, visibility, etc.).', {
54
43
  id: z.string().describe('The testimonial ID to update'),
@@ -57,16 +46,12 @@ export function registerTestimonialTools(server, client) {
57
46
  }, async (params) => {
58
47
  const { id, ...updateData } = params;
59
48
  const data = await client.put(`/testimonial/${id}`, updateData);
60
- return {
61
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
62
- };
49
+ return formatMcpResponse(data);
63
50
  });
64
51
  server.tool('delete-testimonial', 'Permanently delete a testimonial.', {
65
52
  id: z.string().describe('The testimonial ID to delete'),
66
53
  }, async (params) => {
67
54
  const data = await client.delete(`/testimonial/${params.id}`);
68
- return {
69
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
70
- };
55
+ return formatMcpResponse(data);
71
56
  });
72
57
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@talkspresso/mcp-server",
3
- "version": "1.3.0",
4
- "description": "Manage your Talkspresso business through Claude, ChatGPT, or any MCP-compatible AI",
3
+ "version": "1.3.2",
4
+ "description": "Manage your Talkspresso business through Claude Code or any MCP-compatible AI assistant",
5
5
  "bin": {
6
6
  "talkspresso-mcp": "./dist/index.js"
7
7
  },
@@ -17,7 +17,7 @@
17
17
  "talkspresso",
18
18
  "ai",
19
19
  "claude",
20
- "chatgpt"
20
+ "claude-code"
21
21
  ],
22
22
  "license": "MIT",
23
23
  "dependencies": {