@qikdev/mcp 6.6.47 → 6.7.0

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 (42) hide show
  1. package/build/src/tools/campaign.d.ts +41 -0
  2. package/build/src/tools/campaign.d.ts.map +1 -0
  3. package/build/src/tools/campaign.js +331 -0
  4. package/build/src/tools/campaign.js.map +1 -0
  5. package/build/src/tools/checkin.d.ts +25 -0
  6. package/build/src/tools/checkin.d.ts.map +1 -0
  7. package/build/src/tools/checkin.js +199 -0
  8. package/build/src/tools/checkin.js.map +1 -0
  9. package/build/src/tools/create.d.ts.map +1 -1
  10. package/build/src/tools/create.js +225 -24
  11. package/build/src/tools/create.js.map +1 -1
  12. package/build/src/tools/definition.d.ts +90 -0
  13. package/build/src/tools/definition.d.ts.map +1 -0
  14. package/build/src/tools/definition.js +803 -0
  15. package/build/src/tools/definition.js.map +1 -0
  16. package/build/src/tools/filters.d.ts +11 -0
  17. package/build/src/tools/filters.d.ts.map +1 -0
  18. package/build/src/tools/filters.js +146 -0
  19. package/build/src/tools/filters.js.map +1 -0
  20. package/build/src/tools/glossary.d.ts +9 -0
  21. package/build/src/tools/glossary.d.ts.map +1 -1
  22. package/build/src/tools/glossary.js +200 -23
  23. package/build/src/tools/glossary.js.map +1 -1
  24. package/build/src/tools/index.d.ts.map +1 -1
  25. package/build/src/tools/index.js +56 -18
  26. package/build/src/tools/index.js.map +1 -1
  27. package/build/src/tools/list.d.ts.map +1 -1
  28. package/build/src/tools/list.js +41 -1
  29. package/build/src/tools/list.js.map +1 -1
  30. package/build/src/tools/relationships.d.ts +11 -0
  31. package/build/src/tools/relationships.d.ts.map +1 -0
  32. package/build/src/tools/relationships.js +130 -0
  33. package/build/src/tools/relationships.js.map +1 -0
  34. package/build/src/tools/reporting.d.ts +22 -0
  35. package/build/src/tools/reporting.d.ts.map +1 -0
  36. package/build/src/tools/reporting.js +219 -0
  37. package/build/src/tools/reporting.js.map +1 -0
  38. package/build/src/tools/sms.d.ts +13 -0
  39. package/build/src/tools/sms.d.ts.map +1 -0
  40. package/build/src/tools/sms.js +128 -0
  41. package/build/src/tools/sms.js.map +1 -0
  42. package/package.json +1 -1
@@ -0,0 +1,13 @@
1
+ import { Tool } from "@modelcontextprotocol/sdk/types.js";
2
+ export declare const sendBulkSmsTool: Tool;
3
+ export declare function handleSendBulkSms(args: {
4
+ recipients: string[];
5
+ body: string;
6
+ scopes?: string[];
7
+ }): Promise<{
8
+ content: Array<{
9
+ type: string;
10
+ text: string;
11
+ }>;
12
+ }>;
13
+ //# sourceMappingURL=sms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sms.d.ts","sourceRoot":"","sources":["../../../src/tools/sms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG1D,eAAO,MAAM,eAAe,EAAE,IAmC7B,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAsGpK"}
@@ -0,0 +1,128 @@
1
+ import { ConfigManager } from "../config.js";
2
+ export const sendBulkSmsTool = {
3
+ name: "send_bulk_sms",
4
+ description: `Send SMS messages to multiple profiles.
5
+
6
+ **Requirements:**
7
+ - Profiles must have \`phoneNumbersInternational\` populated
8
+ - Only active profiles will receive messages
9
+
10
+ **Process:**
11
+ 1. Use \`list_content\` to find profiles matching your criteria
12
+ 2. Extract their IDs
13
+ 3. Call this tool with those IDs and your message
14
+
15
+ **Note:** SMS sending is queued and processed asynchronously.
16
+ Returns which profiles are valid (have phone) vs invalid (no phone).`,
17
+ inputSchema: {
18
+ type: "object",
19
+ properties: {
20
+ recipients: {
21
+ type: "array",
22
+ items: { type: "string" },
23
+ description: "Array of profile IDs to send SMS to"
24
+ },
25
+ body: {
26
+ type: "string",
27
+ description: "The SMS message text to send"
28
+ },
29
+ scopes: {
30
+ type: "array",
31
+ items: { type: "string" },
32
+ description: "Optional scope IDs for the SMS records"
33
+ }
34
+ },
35
+ required: ["recipients", "body"]
36
+ },
37
+ };
38
+ export async function handleSendBulkSms(args) {
39
+ try {
40
+ const configManager = new ConfigManager();
41
+ const config = await configManager.loadConfig();
42
+ if (!config) {
43
+ throw new Error('Qik MCP server not configured. Run setup first.');
44
+ }
45
+ if (!args.recipients?.length) {
46
+ return {
47
+ content: [{
48
+ type: "text",
49
+ text: `❌ No recipients provided. Please provide an array of profile IDs.`
50
+ }]
51
+ };
52
+ }
53
+ if (!args.body?.trim()) {
54
+ return {
55
+ content: [{
56
+ type: "text",
57
+ text: `❌ No message body provided. Please provide the SMS text to send.`
58
+ }]
59
+ };
60
+ }
61
+ const requestBody = {
62
+ recipients: args.recipients,
63
+ body: args.body
64
+ };
65
+ if (args.scopes?.length) {
66
+ requestBody.scopes = args.scopes;
67
+ }
68
+ const response = await fetch(`${config.apiUrl || 'https://api.qik.dev'}/sms/bulk`, {
69
+ method: 'POST',
70
+ headers: {
71
+ 'Authorization': `Bearer ${config.accessToken}`,
72
+ 'Content-Type': 'application/json',
73
+ },
74
+ body: JSON.stringify(requestBody)
75
+ });
76
+ if (!response.ok) {
77
+ const errorText = await response.text();
78
+ throw new Error(`HTTP ${response.status}: ${errorText}`);
79
+ }
80
+ const result = await response.json();
81
+ const { valid, invalid } = result;
82
+ let resultText = `# SMS Bulk Send\n\n`;
83
+ resultText += `## Summary\n`;
84
+ resultText += `- **Valid recipients**: ${valid?.length || 0} (will receive SMS)\n`;
85
+ resultText += `- **Invalid recipients**: ${invalid?.length || 0} (no phone number)\n\n`;
86
+ if (valid?.length > 0) {
87
+ resultText += `## Valid Recipients\n`;
88
+ for (const profile of valid.slice(0, 10)) {
89
+ const name = [profile.firstName, profile.lastName].filter(Boolean).join(' ') || 'Unknown';
90
+ const phone = profile.phoneNumbersInternational?.[0] || 'Phone on file';
91
+ resultText += `- ${name} (${phone})\n`;
92
+ }
93
+ if (valid.length > 10) {
94
+ resultText += `- ... and ${valid.length - 10} more\n`;
95
+ }
96
+ resultText += '\n';
97
+ }
98
+ if (invalid?.length > 0) {
99
+ resultText += `## Invalid Recipients (no phone)\n`;
100
+ for (const profile of invalid.slice(0, 5)) {
101
+ const name = [profile.firstName, profile.lastName].filter(Boolean).join(' ') || 'Unknown';
102
+ resultText += `- ${name}\n`;
103
+ }
104
+ if (invalid.length > 5) {
105
+ resultText += `- ... and ${invalid.length - 5} more\n`;
106
+ }
107
+ resultText += '\n';
108
+ }
109
+ resultText += `---\n`;
110
+ resultText += `✅ SMS messages have been queued for delivery.\n`;
111
+ resultText += `📱 Message: "${args.body.substring(0, 50)}${args.body.length > 50 ? '...' : ''}"`;
112
+ return {
113
+ content: [{
114
+ type: "text",
115
+ text: resultText
116
+ }]
117
+ };
118
+ }
119
+ catch (error) {
120
+ return {
121
+ content: [{
122
+ type: "text",
123
+ text: `❌ Failed to send bulk SMS: ${error.message}`
124
+ }]
125
+ };
126
+ }
127
+ }
128
+ //# sourceMappingURL=sms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sms.js","sourceRoot":"","sources":["../../../src/tools/sms.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,MAAM,eAAe,GAAS;IACnC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE;;;;;;;;;;;;qEAYsD;IACnE,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,WAAW,EA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AAM;oBACZ,IAAI,EAAE,8BAA8B,KAAK,CAAC,OAAO,EAAE;iBACpD,CAAC;SACH,CAAC;IACJ,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qikdev/mcp",
3
- "version": "6.6.47",
3
+ "version": "6.7.0",
4
4
  "description": "A plug-and-play Model Context Protocol server for the Qik platform - enabling AI assistants to interact with Qik's content management system, user management, forms, files, and more.",
5
5
  "keywords": [
6
6
  "mcp",