Skip to main content
Glama
CSOAI-ORG

Scam Detector MCP

quick_check

Analyze any email, text, or DM to get an instant scam probability score. No API key required.

Instructions

Paste any message (email, text, DM) -> instant scam probability score. No API key required.

Behavior: This tool is read-only and stateless — it produces analysis output without modifying any external systems, databases, or files. Safe to call repeatedly with identical inputs (idempotent). Free tier: 10/day rate limit. Pro tier: unlimited. No authentication required for basic usage.

When to use: Use this tool when you need structured analysis or classification of inputs against established frameworks or standards.

When NOT to use: Not suitable for real-time production decision-making without human review of results. Behavioral Transparency: - Side Effects: This tool is read-only and produces no side effects. It does not modify any external state, databases, or files. All output is computed in-memory and returned directly to the caller. - Authentication: No authentication required for basic usage. Pro/Enterprise tiers require a valid MEOK API key passed via the MEOK_API_KEY environment variable. - Rate Limits: Free tier: 10 calls/day. Pro tier: unlimited. Rate limit headers are included in responses (X-RateLimit-Remaining, X-RateLimit-Reset). - Error Handling: Returns structured error objects with 'error' key on failure. Never raises unhandled exceptions. Invalid inputs return descriptive validation errors. - Idempotency: Fully idempotent — calling with the same inputs always produces the same output. Safe to retry on timeout or transient failure. - Data Privacy: No input data is stored, logged, or transmitted to external services. All processing happens locally within the MCP server process.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes

Implementation Reference

  • Main handler for the quick_check tool. Accepts a message string, checks rate limits, calculates scam score via _calculate_scam_score, classifies risk level (critical/high/moderate/low/minimal), and returns a structured response with scam_probability, risk_level, verdict, recommended_action, tactics_detected, pattern_details, and next_step.
    def quick_check(message: str) -> dict:
        """Paste any message (email, text, DM) -> instant scam probability score. No API key required.
    
        Behavior:
            This tool is read-only and stateless — it produces analysis output
            without modifying any external systems, databases, or files.
            Safe to call repeatedly with identical inputs (idempotent).
            Free tier: 10/day rate limit. Pro tier: unlimited.
            No authentication required for basic usage.
    
        When to use:
            Use this tool when you need structured analysis or classification
            of inputs against established frameworks or standards.
    
        When NOT to use:
            Not suitable for real-time production decision-making without
            human review of results.
        Behavioral Transparency:
            - Side Effects: This tool is read-only and produces no side effects. It does not modify
              any external state, databases, or files. All output is computed in-memory and returned
              directly to the caller.
            - Authentication: No authentication required for basic usage. Pro/Enterprise tiers
              require a valid MEOK API key passed via the MEOK_API_KEY environment variable.
            - Rate Limits: Free tier: 10 calls/day. Pro tier: unlimited. Rate limit headers are
              included in responses (X-RateLimit-Remaining, X-RateLimit-Reset).
            - Error Handling: Returns structured error objects with 'error' key on failure.
              Never raises unhandled exceptions. Invalid inputs return descriptive validation errors.
            - Idempotency: Fully idempotent — calling with the same inputs always produces the
              same output. Safe to retry on timeout or transient failure.
            - Data Privacy: No input data is stored, logged, or transmitted to external services.
              All processing happens locally within the MCP server process.
        """
        limit_err = _check_rate_limit("quick_check_anonymous")
        if limit_err:
            return {"error": "rate_limited", "message": limit_err}
    
        scam_score, matched_patterns = _calculate_scam_score(message)
    
        # Classify risk level
        if scam_score >= 0.75:
            risk_level = "critical"
            verdict = "VERY LIKELY A SCAM"
            action = "Do NOT respond, click links, or provide any personal information. Block and report."
        elif scam_score >= 0.5:
            risk_level = "high"
            verdict = "LIKELY A SCAM"
            action = "Exercise extreme caution. Verify independently through official channels before taking any action."
        elif scam_score >= 0.3:
            risk_level = "moderate"
            verdict = "SUSPICIOUS"
            action = "Proceed with caution. Verify the sender and any claims through official channels."
        elif scam_score >= 0.15:
            risk_level = "low"
            verdict = "SLIGHTLY SUSPICIOUS"
            action = "Likely legitimate but contains some common scam indicators. Verify if unsure."
        else:
            risk_level = "minimal"
            verdict = "APPEARS LEGITIMATE"
            action = "No significant scam indicators detected. Standard caution applies."
    
        # Extract tactics used
        tactics_used = [p["pattern"] for p in matched_patterns]
    
        return {
            "scam_probability": round(scam_score, 2),
            "risk_level": risk_level,
            "verdict": verdict,
            "recommended_action": action,
            "tactics_detected": tactics_used,
            "pattern_details": matched_patterns[:5],
            "message_length": len(message),
            "next_step": (
                "Use detect_social_engineering for deeper manipulation analysis"
                if scam_score >= 0.3
                else "Use report_scam if you believe this is a scam"
            ),
            "meok_labs": "https://meok.ai",
        }
  • Helper function that calculates overall scam probability score (0-1) by iterating over SCAM_PATTERNS, matching keywords via _match_keywords, and applying additional heuristics (ALL CAPS, excessive punctuation, currency signs, grammar red flags).
    def _calculate_scam_score(text):
        # type: (str) -> Tuple[float, List[Dict[str, object]]]
        """Calculate overall scam probability score. Returns (score 0-1, matched_patterns)."""
        total_weight = 0.0
        matches = []  # type: List[Dict[str, object]]
    
        for ptype, pinfo in SCAM_PATTERNS.items():
            matched = _match_keywords(text, pinfo["indicators"])
            if matched:
                total_weight += pinfo["weight"] * min(len(matched) / 3.0, 1.5)
                matches.append({
                    "pattern": pinfo["name"],
                    "weight": pinfo["weight"],
                    "matched_indicators": matched[:5],
                    "description": pinfo["description"],
                })
    
        # Additional heuristics
        text_lower = text.lower()
    
        # ALL CAPS sections
        caps_words = re.findall(r'\b[A-Z]{4,}\b', text)
        if len(caps_words) > 2:
            total_weight += 0.1
    
        # Excessive exclamation/question marks
        if text.count("!") > 3 or text.count("?") > 5:
            total_weight += 0.1
    
        # Multiple dollar/pound/euro signs
        currency_count = len(re.findall(r'[$\u00a3\u20ac]', text))
        if currency_count > 2:
            total_weight += 0.1
    
        # Grammar/spelling red flags (common in scams)
        grammar_flags = [
            "kindly", "dear sir", "dear madam", "dear friend", "dear customer",
            "do the needful", "revert back", "prepone",
        ]
        if _match_keywords(text, grammar_flags):
            total_weight += 0.15
    
        # Normalize to 0-1
        score = min(1.0, total_weight / 1.5)
        return score, matches
  • Helper function that performs case-insensitive keyword matching, returning a list of matched keywords found in the input text.
    def _match_keywords(text, keywords):
        # type: (str, List[str]) -> List[str]
        """Return matched keywords found in text (case-insensitive)."""
        text_lower = text.lower()
        return [kw for kw in keywords if kw.lower() in text_lower]
  • server.py:311-312 (registration)
    Registration of quick_check as an MCP tool via the @mcp.tool() decorator on FastMCP server instance at line 299.
    # Tool: quick_check -- ZERO config, no API key, instant result
    # ---------------------------------------------------------------------------
  • Rate limit checker used by quick_check. Enforces a free tier limit of 10 calls/day, returning an error string if exceeded.
    def _check_rate_limit(caller="anonymous", tier="free"):
        # type: (str, str) -> Optional[str]
        """Returns error string if rate-limited, else None."""
        if tier == "pro":
            return None
        now = datetime.now()
        cutoff = now - timedelta(days=1)
        _usage[caller] = [t for t in _usage[caller] if t > cutoff]
        if len(_usage[caller]) >= FREE_DAILY_LIMIT:
            return (
                "Free tier limit reached ({}/day). "
                "Upgrade to MEOK AI Labs Pro for unlimited access at $29/mo: "
                "https://meok.ai/mcp/scam-detector/pro".format(FREE_DAILY_LIMIT)
            )
        _usage[caller].append(now)
        return None
Behavior5/5

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

Detailed behavioral transparency section covering side effects, authentication, rate limits, error handling, idempotency, and data privacy. Exceeds what annotations would provide.

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?

Well-structured with clear headings, front-loaded purpose, and efficient use of text. Every sentence adds value.

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?

Covers all necessary aspects: purpose, usage guidelines, behavioral details, and parameter semantics. No gaps for a simple analysis tool.

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

Parameters4/5

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

Single parameter 'message' is clearly described as the input text. Although schema lacks description, the tool description adds meaningful context about the parameter's role.

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?

Clearly states the tool provides a scam probability score for messages (email, text, DM). Differentiated from siblings like analyze_url which handles URLs.

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

Usage Guidelines5/5

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

Explicit 'When to use' and 'When NOT to use' sections guide appropriate usage, including caveats about real-time decisions and rate limits.

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/CSOAI-ORG/scam-detector-mcp'

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