groundmail-mcp 0.6.3 → 0.7.1

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 (2) hide show
  1. package/dist/index.js +61 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -118,6 +118,17 @@ function pagedOutput(key, item, description) {
118
118
  [key]
119
119
  );
120
120
  }
121
+ function heldBackItem() {
122
+ return object(
123
+ {
124
+ email: string("The held-back address"),
125
+ reason: string(
126
+ "Why: invalid_address (cannot exist), no_mail_server (domain takes no email), previously_bounced (hard-bounced for a Groundmail sender in the last 90 days) or mailbox_not_found"
127
+ )
128
+ },
129
+ ["email", "reason"]
130
+ );
131
+ }
121
132
  var emailItem = object(
122
133
  {
123
134
  id: string("Email id (msg_\u2026)"),
@@ -130,6 +141,15 @@ var emailItem = object(
130
141
  status: string("Current delivery status, for example sent, delivered or bounced"),
131
142
  last_event: nullableString("Most recent delivery event, if any"),
132
143
  bounce_reason: nullableString("Reason reported when the email bounced"),
144
+ bounce_type: {
145
+ type: ["string", "null"],
146
+ enum: ["hard", "block", null],
147
+ description: "Why it bounced: hard (address cannot receive; suppressed) or block (the receiving server refused the sender for reputation or policy; address not suppressed, safe to retry later). Null if it did not bounce"
148
+ },
149
+ held_back: arrayOf(
150
+ heldBackItem(),
151
+ "Recipients Groundmail validation held back before sending, with why; empty when none were"
152
+ ),
133
153
  tags: { description: "Tags attached to the email" },
134
154
  scheduled_at: nullableString("When the email is scheduled to send (ISO 8601)"),
135
155
  cancelled_at: nullableString("When the scheduled email was cancelled (ISO 8601)"),
@@ -243,10 +263,32 @@ var bucketProperties = {
243
263
  var sendEmailOutput = object(
244
264
  {
245
265
  id: string("Email id (msg_\u2026)"),
246
- status: string("Status after the request, for example queued or scheduled")
266
+ status: string("Status after the request, for example queued or scheduled"),
267
+ held_back: arrayOf(
268
+ heldBackItem(),
269
+ "Present when Groundmail validation held some recipients back; the email went to the rest"
270
+ )
247
271
  },
248
272
  ["id", "status"]
249
273
  );
274
+ var validateEmailOutput = object(
275
+ {
276
+ email: string("The address as checked (trimmed, lowercased)"),
277
+ domain: nullableString("Domain part of the address; null when there is none"),
278
+ verdict: {
279
+ type: "string",
280
+ enum: ["valid", "risky", "invalid"],
281
+ description: "valid: safe to send; risky: deliverable but worth a second look; invalid: cannot receive email"
282
+ },
283
+ reasons: stringArray(
284
+ "What was found: syntax, no_mail_server, mailbox_not_found, previously_bounced (invalid); disposable, catch_all, possible_typo (risky); role (informational)"
285
+ ),
286
+ suggestion: nullableString("The address with a likely-mistyped domain corrected, for example ada@gmail.com for ada@gmial.com"),
287
+ disposable: boolean("A throwaway-inbox service"),
288
+ role: boolean("A team or queue mailbox such as info@ or support@")
289
+ },
290
+ ["email", "verdict", "reasons", "suggestion", "disposable", "role"]
291
+ );
250
292
  var getEmailOutput = object({ email: described(emailItem, "The email") }, ["email"]);
251
293
  var domainWithRecordsOutput = object(
252
294
  {
@@ -539,6 +581,11 @@ async function callMcpTool(client, name, args) {
539
581
  })
540
582
  );
541
583
  }
584
+ case "validate_email": {
585
+ const email = optString(args, "email");
586
+ if (!email) return textResult("Missing required argument: email", true);
587
+ return textResult(await client.validate(email));
588
+ }
542
589
  case "add_suppression": {
543
590
  const email = optString(args, "email");
544
591
  if (!email) return textResult("Missing required argument: email", true);
@@ -881,6 +928,19 @@ var MCP_TOOLS = [
881
928
  outputSchema: pagedOutput("data", suppressionItem, "Suppressed addresses on this page"),
882
929
  annotations: readOnly("List suppressions")
883
930
  },
931
+ {
932
+ name: "validate_email",
933
+ description: "Check one email address with Groundmail validation before accepting it (for example at signup): verdict valid | risky | invalid, reasons, a typo suggestion, and disposable / role flags. Free; sends nothing.",
934
+ inputSchema: {
935
+ type: "object",
936
+ properties: {
937
+ email: { type: "string", description: "Email address to check" }
938
+ },
939
+ required: ["email"]
940
+ },
941
+ outputSchema: validateEmailOutput,
942
+ annotations: readOnly("Validate email address")
943
+ },
884
944
  {
885
945
  name: "add_suppression",
886
946
  description: "Add an address to the suppression list.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "groundmail-mcp",
3
- "version": "0.6.3",
3
+ "version": "0.7.1",
4
4
  "mcpName": "io.github.Groundmail/groundmail",
5
5
  "description": "Groundmail MCP server: send transactional email, manage domains, templates, webhooks and suppressions from Claude, Cursor, ChatGPT and other MCP clients",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@modelcontextprotocol/sdk": "^1.30.0",
44
- "groundmail": "0.14.7"
44
+ "groundmail": "0.15.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "tsup": "^8.5.0",