Skip to main content
Glama
Davison-Francis

@deliveriq/mcp

Spam Trap Analysis

deliveriq_spam_trap_analysis
Idempotent

Analyze any email address for spam trap risk using 13 signals including domain age, DNSBL listing, and pattern trust. Get risk level, trap type, and confidence score to protect sender reputation and improve deliverability.

Instructions

Analyze an email address for spam trap risk using 13 signals including domain age, DNSBL listing, disposability, role-based detection, entropy, and email pattern trust.

Args:

  • email (string): Email address to analyze

Returns: Risk level (low/medium/high), trap type (pristine/recycled/typo/none), confidence score, and all 13 signals.

Examples:

  • "Is user@example.com a spam trap?" -> { email: "user@example.com" }

Credit cost: 1 credit

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesEmail address to analyze for spam trap risk (e.g. "user@example.com")

Implementation Reference

  • The handler function that executes the deliveriq_spam_trap_analysis tool logic: calls client.tools.spamTrapAnalysis(params.email) and formats the response with risk level, trap type, confidence score, and all 13 signals.
      async (params) => {
        try {
          const res = await client.tools.spamTrapAnalysis(params.email);
          const r = res.result;
    
          const lines = [
            `# Spam Trap Analysis: ${res.email}`,
            '',
            `**Risk Level**: ${r.riskLevel.toUpperCase()} | **Trap Type**: ${r.trapType} | **Confidence**: ${(r.confidence * 100).toFixed(0)}%`,
            `**Score**: ${r.score.toFixed(3)}`,
            '',
            '## Signals',
            `| Signal | Value |`,
            `|--------|-------|`,
            `| Domain age | ${r.signals.domainAge ? `${r.signals.domainAge.ageDays} days (${r.signals.domainAge.riskLevel})` : 'Unknown'} |`,
            `| DNSBL listed | ${r.signals.dnsblListed ? `Yes (${r.signals.dnsblHitCount} hits)` : 'No'} |`,
            `| Disposable | ${r.signals.isDisposable ? 'Yes' : 'No'} |`,
            `| Role-based | ${r.signals.isRoleBased ? 'Yes' : 'No'} |`,
            `| Has Gravatar | ${r.signals.hasGravatar ? 'Yes' : 'No'} |`,
            `| Has MX | ${r.signals.hasMx ? 'Yes' : 'No'} |`,
            `| Local part entropy | ${r.signals.localPartEntropy.toFixed(2)} |`,
            `| Email pattern trust | ${(r.signals.emailPatternTrust * 100).toFixed(0)}% |`,
            `| Email pattern | ${r.signals.emailPattern ?? 'None detected'} |`,
            `| Has suggestion | ${r.signals.hasSuggestion ? 'Yes (possible typo)' : 'No'} |`,
            `| MX has PTR | ${r.signals.mxHasPtrRecord === null ? 'Unknown' : r.signals.mxHasPtrRecord ? 'Yes' : 'No'} |`,
            `| MX IP DNSBL listed | ${r.signals.mxIpDnsblListed === null ? 'Unknown' : r.signals.mxIpDnsblListed ? 'Yes' : 'No'} |`,
          ];
    
          return successResponse(lines.join('\n'));
        } catch (error) {
          return handleSdkError(error);
        }
      },
    );
  • Registers the 'deliveriq_spam_trap_analysis' tool on the MCP server with title, description, input schema, and annotations. Part of the registerIntelligenceTools function.
      // ── 9. deliveriq_spam_trap_analysis ───────────────────────────
    
      server.registerTool(
        'deliveriq_spam_trap_analysis',
        {
          title: 'Spam Trap Analysis',
          description: `Analyze an email address for spam trap risk using 13 signals including domain age, DNSBL listing, disposability, role-based detection, entropy, and email pattern trust.
    
    Args:
      - email (string): Email address to analyze
    
    Returns:
      Risk level (low/medium/high), trap type (pristine/recycled/typo/none), confidence score, and all 13 signals.
    
    Examples:
      - "Is user@example.com a spam trap?" -> { email: "user@example.com" }
    
    Credit cost: 1 credit`,
          inputSchema: SpamTrapAnalysisSchema,
          annotations: {
            readOnlyHint: false,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: true,
          },
        },
        async (params) => {
          try {
            const res = await client.tools.spamTrapAnalysis(params.email);
            const r = res.result;
    
            const lines = [
              `# Spam Trap Analysis: ${res.email}`,
              '',
              `**Risk Level**: ${r.riskLevel.toUpperCase()} | **Trap Type**: ${r.trapType} | **Confidence**: ${(r.confidence * 100).toFixed(0)}%`,
              `**Score**: ${r.score.toFixed(3)}`,
              '',
              '## Signals',
              `| Signal | Value |`,
              `|--------|-------|`,
              `| Domain age | ${r.signals.domainAge ? `${r.signals.domainAge.ageDays} days (${r.signals.domainAge.riskLevel})` : 'Unknown'} |`,
              `| DNSBL listed | ${r.signals.dnsblListed ? `Yes (${r.signals.dnsblHitCount} hits)` : 'No'} |`,
              `| Disposable | ${r.signals.isDisposable ? 'Yes' : 'No'} |`,
              `| Role-based | ${r.signals.isRoleBased ? 'Yes' : 'No'} |`,
              `| Has Gravatar | ${r.signals.hasGravatar ? 'Yes' : 'No'} |`,
              `| Has MX | ${r.signals.hasMx ? 'Yes' : 'No'} |`,
              `| Local part entropy | ${r.signals.localPartEntropy.toFixed(2)} |`,
              `| Email pattern trust | ${(r.signals.emailPatternTrust * 100).toFixed(0)}% |`,
              `| Email pattern | ${r.signals.emailPattern ?? 'None detected'} |`,
              `| Has suggestion | ${r.signals.hasSuggestion ? 'Yes (possible typo)' : 'No'} |`,
              `| MX has PTR | ${r.signals.mxHasPtrRecord === null ? 'Unknown' : r.signals.mxHasPtrRecord ? 'Yes' : 'No'} |`,
              `| MX IP DNSBL listed | ${r.signals.mxIpDnsblListed === null ? 'Unknown' : r.signals.mxIpDnsblListed ? 'Yes' : 'No'} |`,
            ];
    
            return successResponse(lines.join('\n'));
          } catch (error) {
            return handleSdkError(error);
          }
        },
      );
  • Zod schema for spam trap analysis input validation: requires a valid email string.
    export const SpamTrapAnalysisSchema = z.object({
      email: z.string().email('Must be a valid email address')
        .describe('Email address to analyze for spam trap risk (e.g. "user@example.com")'),
    }).strict();
  • SDK method that makes the POST request to /tools/spam-trap-analysis endpoint.
    /** Evaluate an email against 13 spam trap signals. Costs 1 credit. */
    async spamTrapAnalysis(email: string, opts?: RequestOptions): Promise<SpamTrapAnalysisResponse> {
      return this.http.post<SpamTrapAnalysisResponse>('/tools/spam-trap-analysis', { email }, opts);
  • TypeScript type definitions for SpamTrapSignals (13 signals) and SpamTrapAnalysisResponse (riskLevel, trapType, confidence, score, signals).
    export interface SpamTrapSignals {
      hasSuggestion: boolean;
      domainAge: DomainAgeResult | null;
      dnsblListed: boolean;
      dnsblHitCount: number;
      isDisposable: boolean;
      isRoleBased: boolean;
      hasGravatar: boolean;
      hasMx: boolean;
      localPartEntropy: number;
      emailPatternTrust: number;
      emailPattern: string | null;
      mxHasPtrRecord: boolean | null;
      mxIpDnsblListed: boolean | null;
    }
    
    export interface SpamTrapAnalysisResponse {
      success: true;
      email: string;
      result: {
        score: number;
        riskLevel: 'low' | 'medium' | 'high';
        trapType: 'pristine' | 'recycled' | 'typo' | 'none' | 'unknown';
        confidence: number;
        signals: SpamTrapSignals;
      };
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate idempotentHint=true and other safe operation hints. The description adds behavioral context: credit cost per call, and outlines the return structure (risk level, trap type, confidence score, 13 signals). This clarifies the output beyond schema, but does not delve into error handling or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured with clear sections: Args, Returns, Examples, Credit cost. It is front-loaded with the main purpose, and every sentence adds value. No extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple tool (single parameter, detailed schema, good annotations, no output schema), the description is complete. It explains the return values (risk level, trap type, confidence, all 13 signals) and provides an example, making it easy for an agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage for the single parameter 'email', including format and example. The description repeats this and adds a usage example. With complete schema coverage, the description does not add significant new semantic meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Analyze an email address for spam trap risk using 13 signals'. It specifies the resource (email address) and action (analyze for spam trap risk), with examples and a list of signal types. This distinguishes it from sibling tools like deliveriq_verify_email or deliveriq_blacklist_check, which have different focuses.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for analyzing spam trap risk and provides an example, but does not explicitly state when to use this tool vs alternatives (e.g., when not to use, or which sibling to choose for other email checks). It includes a credit cost note but lacks exclusions or alternative tool guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Davison-Francis/min8t-sdks'

If you have feedback or need assistance with the MCP directory API, please join our Discord server