pulsemcp-cms-admin-mcp-server 0.3.2 → 0.3.3
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,4 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
// Default email content template
|
|
3
|
+
const DEFAULT_EMAIL_CONTENT = `Hi there,
|
|
4
|
+
|
|
5
|
+
Your submission is now live here: \${implementationUrl}
|
|
6
|
+
|
|
7
|
+
Let us know how we can be helpful to you!
|
|
8
|
+
|
|
9
|
+
Best,
|
|
10
|
+
Tadas`;
|
|
2
11
|
// Parameter descriptions - single source of truth
|
|
3
12
|
const PARAM_DESCRIPTIONS = {
|
|
4
13
|
implementation_id: 'The ID of the MCP implementation to send notification for (e.g., 11371)',
|
|
@@ -6,6 +15,9 @@ const PARAM_DESCRIPTIONS = {
|
|
|
6
15
|
from_email_address: 'Sender email address. Default: "tadas@s.pulsemcp.com"',
|
|
7
16
|
from_name: 'Sender display name. Default: "Tadas at PulseMCP"',
|
|
8
17
|
reply_to_email_address: 'Reply-to email address. Default: "tadas@pulsemcp.com"',
|
|
18
|
+
content: `Custom email body content. Use \${implementationUrl} to insert the link to the live implementation. Default:
|
|
19
|
+
|
|
20
|
+
${DEFAULT_EMAIL_CONTENT}`,
|
|
9
21
|
};
|
|
10
22
|
const SendMCPImplementationPostingNotificationSchema = z.object({
|
|
11
23
|
implementation_id: z.number().describe(PARAM_DESCRIPTIONS.implementation_id),
|
|
@@ -17,6 +29,7 @@ const SendMCPImplementationPostingNotificationSchema = z.object({
|
|
|
17
29
|
.email()
|
|
18
30
|
.optional()
|
|
19
31
|
.describe(PARAM_DESCRIPTIONS.reply_to_email_address),
|
|
32
|
+
content: z.string().optional().describe(PARAM_DESCRIPTIONS.content),
|
|
20
33
|
});
|
|
21
34
|
export function sendMCPImplementationPostingNotification(_server, clientFactory) {
|
|
22
35
|
return {
|
|
@@ -41,9 +54,29 @@ Example usage:
|
|
|
41
54
|
"to_email_address": "developer@example.com" // Optional override
|
|
42
55
|
}
|
|
43
56
|
|
|
57
|
+
**Customizing email content:**
|
|
58
|
+
Use the \`content\` parameter to customize the email body. Include \`\${implementationUrl}\` where you want the link to the live implementation inserted.
|
|
59
|
+
|
|
60
|
+
Default content:
|
|
61
|
+
\`\`\`
|
|
62
|
+
Hi there,
|
|
63
|
+
|
|
64
|
+
Your submission is now live here: \${implementationUrl}
|
|
65
|
+
|
|
66
|
+
Let us know how we can be helpful to you!
|
|
67
|
+
|
|
68
|
+
Best,
|
|
69
|
+
Tadas
|
|
70
|
+
\`\`\`
|
|
71
|
+
|
|
72
|
+
Example with custom content:
|
|
73
|
+
{
|
|
74
|
+
"implementation_id": 11371,
|
|
75
|
+
"content": "Hey Mike,\\n\\nYour submission is now live here: \${implementationUrl}\\n\\nLet us know how we can be helpful to you!\\n\\nBest,\\nTadas"
|
|
76
|
+
}
|
|
77
|
+
|
|
44
78
|
Default email template:
|
|
45
79
|
- Subject: "Thanks for your submission to PulseMCP!"
|
|
46
|
-
- Content: Personalized message with link to the live implementation
|
|
47
80
|
- From: "Tadas at PulseMCP" <tadas@s.pulsemcp.com>
|
|
48
81
|
- Reply-to: tadas@pulsemcp.com
|
|
49
82
|
|
|
@@ -52,8 +85,7 @@ Use cases:
|
|
|
52
85
|
- Send thank you emails after publishing implementations
|
|
53
86
|
- Automate the notification process after approving submissions
|
|
54
87
|
- Re-send notifications if needed
|
|
55
|
-
|
|
56
|
-
Note: The email content includes the direct link to the published implementation on PulseMCP.`,
|
|
88
|
+
- Send customized messages for different implementation types`,
|
|
57
89
|
inputSchema: {
|
|
58
90
|
type: 'object',
|
|
59
91
|
properties: {
|
|
@@ -77,6 +109,10 @@ Note: The email content includes the direct link to the published implementation
|
|
|
77
109
|
type: 'string',
|
|
78
110
|
description: PARAM_DESCRIPTIONS.reply_to_email_address,
|
|
79
111
|
},
|
|
112
|
+
content: {
|
|
113
|
+
type: 'string',
|
|
114
|
+
description: PARAM_DESCRIPTIONS.content,
|
|
115
|
+
},
|
|
80
116
|
},
|
|
81
117
|
required: ['implementation_id'],
|
|
82
118
|
},
|
|
@@ -118,6 +154,10 @@ Note: The email content includes the direct link to the published implementation
|
|
|
118
154
|
if (!recipientEmail) {
|
|
119
155
|
throw new Error('No recipient email address found. Please provide to_email_address parameter or ensure the implementation has an email in its internal notes.');
|
|
120
156
|
}
|
|
157
|
+
// Prepare email content - use custom content or default, replacing ${implementationUrl}
|
|
158
|
+
// Using function callback to avoid special character issues in replacement
|
|
159
|
+
const contentTemplate = validatedArgs.content || DEFAULT_EMAIL_CONTENT;
|
|
160
|
+
const emailContent = contentTemplate.replace(/\$\{implementationUrl\}/g, () => implementationUrl);
|
|
121
161
|
// Prepare email parameters with defaults
|
|
122
162
|
const emailParams = {
|
|
123
163
|
from_email_address: validatedArgs.from_email_address || 'tadas@s.pulsemcp.com',
|
|
@@ -125,14 +165,7 @@ Note: The email content includes the direct link to the published implementation
|
|
|
125
165
|
reply_to_email_address: validatedArgs.reply_to_email_address || 'tadas@pulsemcp.com',
|
|
126
166
|
to_email_address: recipientEmail,
|
|
127
167
|
subject: 'Thanks for your submission to PulseMCP!',
|
|
128
|
-
content:
|
|
129
|
-
|
|
130
|
-
Your submission is now live here: ${implementationUrl}
|
|
131
|
-
|
|
132
|
-
Let us know how we can be helpful to you!
|
|
133
|
-
|
|
134
|
-
Best,
|
|
135
|
-
Tadas`,
|
|
168
|
+
content: emailContent,
|
|
136
169
|
};
|
|
137
170
|
// Send the email via the API
|
|
138
171
|
const emailResult = await client.sendEmail(emailParams);
|
package/package.json
CHANGED
|
@@ -26,6 +26,10 @@ export declare function sendMCPImplementationPostingNotification(_server: Server
|
|
|
26
26
|
type: string;
|
|
27
27
|
description: "Reply-to email address. Default: \"tadas@pulsemcp.com\"";
|
|
28
28
|
};
|
|
29
|
+
content: {
|
|
30
|
+
type: string;
|
|
31
|
+
description: "Custom email body content. Use ${implementationUrl} to insert the link to the live implementation. Default:\n\nHi there,\n\nYour submission is now live here: ${implementationUrl}\n\nLet us know how we can be helpful to you!\n\nBest,\nTadas";
|
|
32
|
+
};
|
|
29
33
|
};
|
|
30
34
|
required: string[];
|
|
31
35
|
};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
// Default email content template
|
|
3
|
+
const DEFAULT_EMAIL_CONTENT = `Hi there,
|
|
4
|
+
|
|
5
|
+
Your submission is now live here: \${implementationUrl}
|
|
6
|
+
|
|
7
|
+
Let us know how we can be helpful to you!
|
|
8
|
+
|
|
9
|
+
Best,
|
|
10
|
+
Tadas`;
|
|
2
11
|
// Parameter descriptions - single source of truth
|
|
3
12
|
const PARAM_DESCRIPTIONS = {
|
|
4
13
|
implementation_id: 'The ID of the MCP implementation to send notification for (e.g., 11371)',
|
|
@@ -6,6 +15,9 @@ const PARAM_DESCRIPTIONS = {
|
|
|
6
15
|
from_email_address: 'Sender email address. Default: "tadas@s.pulsemcp.com"',
|
|
7
16
|
from_name: 'Sender display name. Default: "Tadas at PulseMCP"',
|
|
8
17
|
reply_to_email_address: 'Reply-to email address. Default: "tadas@pulsemcp.com"',
|
|
18
|
+
content: `Custom email body content. Use \${implementationUrl} to insert the link to the live implementation. Default:
|
|
19
|
+
|
|
20
|
+
${DEFAULT_EMAIL_CONTENT}`,
|
|
9
21
|
};
|
|
10
22
|
const SendMCPImplementationPostingNotificationSchema = z.object({
|
|
11
23
|
implementation_id: z.number().describe(PARAM_DESCRIPTIONS.implementation_id),
|
|
@@ -17,6 +29,7 @@ const SendMCPImplementationPostingNotificationSchema = z.object({
|
|
|
17
29
|
.email()
|
|
18
30
|
.optional()
|
|
19
31
|
.describe(PARAM_DESCRIPTIONS.reply_to_email_address),
|
|
32
|
+
content: z.string().optional().describe(PARAM_DESCRIPTIONS.content),
|
|
20
33
|
});
|
|
21
34
|
export function sendMCPImplementationPostingNotification(_server, clientFactory) {
|
|
22
35
|
return {
|
|
@@ -41,9 +54,29 @@ Example usage:
|
|
|
41
54
|
"to_email_address": "developer@example.com" // Optional override
|
|
42
55
|
}
|
|
43
56
|
|
|
57
|
+
**Customizing email content:**
|
|
58
|
+
Use the \`content\` parameter to customize the email body. Include \`\${implementationUrl}\` where you want the link to the live implementation inserted.
|
|
59
|
+
|
|
60
|
+
Default content:
|
|
61
|
+
\`\`\`
|
|
62
|
+
Hi there,
|
|
63
|
+
|
|
64
|
+
Your submission is now live here: \${implementationUrl}
|
|
65
|
+
|
|
66
|
+
Let us know how we can be helpful to you!
|
|
67
|
+
|
|
68
|
+
Best,
|
|
69
|
+
Tadas
|
|
70
|
+
\`\`\`
|
|
71
|
+
|
|
72
|
+
Example with custom content:
|
|
73
|
+
{
|
|
74
|
+
"implementation_id": 11371,
|
|
75
|
+
"content": "Hey Mike,\\n\\nYour submission is now live here: \${implementationUrl}\\n\\nLet us know how we can be helpful to you!\\n\\nBest,\\nTadas"
|
|
76
|
+
}
|
|
77
|
+
|
|
44
78
|
Default email template:
|
|
45
79
|
- Subject: "Thanks for your submission to PulseMCP!"
|
|
46
|
-
- Content: Personalized message with link to the live implementation
|
|
47
80
|
- From: "Tadas at PulseMCP" <tadas@s.pulsemcp.com>
|
|
48
81
|
- Reply-to: tadas@pulsemcp.com
|
|
49
82
|
|
|
@@ -52,8 +85,7 @@ Use cases:
|
|
|
52
85
|
- Send thank you emails after publishing implementations
|
|
53
86
|
- Automate the notification process after approving submissions
|
|
54
87
|
- Re-send notifications if needed
|
|
55
|
-
|
|
56
|
-
Note: The email content includes the direct link to the published implementation on PulseMCP.`,
|
|
88
|
+
- Send customized messages for different implementation types`,
|
|
57
89
|
inputSchema: {
|
|
58
90
|
type: 'object',
|
|
59
91
|
properties: {
|
|
@@ -77,6 +109,10 @@ Note: The email content includes the direct link to the published implementation
|
|
|
77
109
|
type: 'string',
|
|
78
110
|
description: PARAM_DESCRIPTIONS.reply_to_email_address,
|
|
79
111
|
},
|
|
112
|
+
content: {
|
|
113
|
+
type: 'string',
|
|
114
|
+
description: PARAM_DESCRIPTIONS.content,
|
|
115
|
+
},
|
|
80
116
|
},
|
|
81
117
|
required: ['implementation_id'],
|
|
82
118
|
},
|
|
@@ -118,6 +154,10 @@ Note: The email content includes the direct link to the published implementation
|
|
|
118
154
|
if (!recipientEmail) {
|
|
119
155
|
throw new Error('No recipient email address found. Please provide to_email_address parameter or ensure the implementation has an email in its internal notes.');
|
|
120
156
|
}
|
|
157
|
+
// Prepare email content - use custom content or default, replacing ${implementationUrl}
|
|
158
|
+
// Using function callback to avoid special character issues in replacement
|
|
159
|
+
const contentTemplate = validatedArgs.content || DEFAULT_EMAIL_CONTENT;
|
|
160
|
+
const emailContent = contentTemplate.replace(/\$\{implementationUrl\}/g, () => implementationUrl);
|
|
121
161
|
// Prepare email parameters with defaults
|
|
122
162
|
const emailParams = {
|
|
123
163
|
from_email_address: validatedArgs.from_email_address || 'tadas@s.pulsemcp.com',
|
|
@@ -125,14 +165,7 @@ Note: The email content includes the direct link to the published implementation
|
|
|
125
165
|
reply_to_email_address: validatedArgs.reply_to_email_address || 'tadas@pulsemcp.com',
|
|
126
166
|
to_email_address: recipientEmail,
|
|
127
167
|
subject: 'Thanks for your submission to PulseMCP!',
|
|
128
|
-
content:
|
|
129
|
-
|
|
130
|
-
Your submission is now live here: ${implementationUrl}
|
|
131
|
-
|
|
132
|
-
Let us know how we can be helpful to you!
|
|
133
|
-
|
|
134
|
-
Best,
|
|
135
|
-
Tadas`,
|
|
168
|
+
content: emailContent,
|
|
136
169
|
};
|
|
137
170
|
// Send the email via the API
|
|
138
171
|
const emailResult = await client.sendEmail(emailParams);
|