groundmail-mcp 0.6.4 → 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 +56 -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)"),
@@ -135,6 +146,10 @@ var emailItem = object(
135
146
  enum: ["hard", "block", null],
136
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"
137
148
  },
149
+ held_back: arrayOf(
150
+ heldBackItem(),
151
+ "Recipients Groundmail validation held back before sending, with why; empty when none were"
152
+ ),
138
153
  tags: { description: "Tags attached to the email" },
139
154
  scheduled_at: nullableString("When the email is scheduled to send (ISO 8601)"),
140
155
  cancelled_at: nullableString("When the scheduled email was cancelled (ISO 8601)"),
@@ -248,10 +263,32 @@ var bucketProperties = {
248
263
  var sendEmailOutput = object(
249
264
  {
250
265
  id: string("Email id (msg_\u2026)"),
251
- 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
+ )
252
271
  },
253
272
  ["id", "status"]
254
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
+ );
255
292
  var getEmailOutput = object({ email: described(emailItem, "The email") }, ["email"]);
256
293
  var domainWithRecordsOutput = object(
257
294
  {
@@ -544,6 +581,11 @@ async function callMcpTool(client, name, args) {
544
581
  })
545
582
  );
546
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
+ }
547
589
  case "add_suppression": {
548
590
  const email = optString(args, "email");
549
591
  if (!email) return textResult("Missing required argument: email", true);
@@ -886,6 +928,19 @@ var MCP_TOOLS = [
886
928
  outputSchema: pagedOutput("data", suppressionItem, "Suppressed addresses on this page"),
887
929
  annotations: readOnly("List suppressions")
888
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
+ },
889
944
  {
890
945
  name: "add_suppression",
891
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.4",
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.8"
44
+ "groundmail": "0.15.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "tsup": "^8.5.0",