Skip to main content
Glama

isMalicious threat intelligence for AI agents

Scan an email for phishing and malware

scan_email
Read-onlyIdempotent

Scan ONE email message for phishing and malware before delivering, opening or acting on it. Send the raw message (eml, preferred) or the fields you already parsed (message: headers, text, html, attachment names, types and digests). Returns a verdict (malicious | suspicious | clean | inconclusive), a recommendedAction (quarantine | review | warn | deliver), a 0-100 riskScore, a headline you can relay as is, the strongest reasons, and what it could not check (coverage.skipped). It reads the sender and Reply-To, the connecting server, every link host and every attachment hash against threat intelligence, plus the tells of a phishing message: link text that names another site, a domain or a display name that imitates a well-known brand, a program named like a document, a display name that shows another address, credentials in a URL, an IDN homograph. From a raw message it also reads attachments for structure, never running them: the file type from its bytes, macros and remote templates in Office files, risky entries in archives, PDF actions, HTML that rebuilds a file in the browser; a message attached to it is read as a message of its own. It also flags text aimed at an AI reading the mail (prompt injection, including text hidden from a person). It never runs an attachment, fetches a link or calls a third party while you wait. malicious needs a listing in our data: the shape of a message alone asks for a review at most. clean is a positive claim and needs your own receiving system's DMARC pass: pass authservId (the id it writes in its Authentication-Results header) or trustAuthenticationResults, otherwise a message with nothing against it is inconclusive, which is not safe. deliver means no objection from this scan; never use it to release a message another engine quarantined. Costs one scan of the scan meter per message, whatever its size (not a request of the monthly quota).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emlNoThe whole message as RFC 5322 text (a .eml file), headers first. Up to 10 MiB. Preferred when you have it: attachments are then read for structure. Use message for one that is too large, or that you only have parsed. Send exactly one of eml and message.
messageNoA message you already parsed (Microsoft Graph, Gmail API…). Attachments carry digests, not bytes, so their structure is not read. Send exactly one of eml and message.
authservIdNoThe authserv-id your receiving system writes in its Authentication-Results header (for example mx.google.com). Only a header carrying it is read as SPF/DKIM/DMARC evidence, because anyone can write one into a message.
trustedHopsNoHow many Received headers, counted from the top, your own servers wrote. The connecting server is the one the last of them recorded. Default 1.
connectingIpNoThe IP address that connected to your infrastructure, when you already have it. Overrides the Received chain.
trustAuthenticationResultsNoTrue when every Authentication-Results header in the message was added by your own infrastructure (Exchange Online writes it with no authserv-id). Needed, with or instead of authservId, for a message to be clean.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavioral context beyond annotations: never runs attachments, fetches links, or calls third parties while waiting; explains clean vs inconclusive risk, malicious evidence requirements, and meter cost. Annotations already declare read-only, open-world, and idempotent behavior, and the description does not contradict them.

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

Conciseness4/5

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

Front-loads purpose and return values, and most sentences carry actionable security nuance. It is dense and somewhat repetitious in the middle, which keeps it from being maximally concise.

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?

No output schema exists, yet the description enumerates the return shape: verdict, recommendedAction, riskScore, headline, reasons, and coverage.skipped. It also covers key caveats for interpretation and safe use, making it complete for a complex security scan.

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?

Schema coverage is 100%, so baseline is 3, but the description adds consequence-level meaning: eml is preferred because attachments are then read for structure, authservId/trustAuthenticationResults are needed for a clean verdict, and connectingIp overrides the Received chain. These details tie parameters directly to output outcomes.

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?

States a specific verb and resource: 'Scan ONE email message for phishing and malware before delivering, opening or acting on it.' The email-specific scope distinguishes it from sibling tools like check_indicator, check_url, and get_cve.

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

Usage Guidelines4/5

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

Gives clear timing and prerequisites: scan before delivering/opening/acting, send eml or parsed message, pass authservId or trustAuthenticationResults for a clean verdict. Includes an explicit when-not: never use deliver to release a message another engine quarantined. Does not name sibling alternatives, so not a full 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.