Skip to main content
Glama

util_email_parse

Read-only

Email (.eml / MIME) parser — Parse a raw RFC 5322 email into clean JSON. Pass eml= (the full message source incl. headers, URL-encoded, max 1 MB) or url= (link to a .eml file). Decodes RFC 2047 encoded-word headers, RFC 2231 filenames, base64 and quoted-printable bodies and legacy charsets; walks nested multipart trees and attached message/rfc822. Returns subject, from (with display name), to/cc/bcc/reply-to/sender/return-path address lists, date (ISO), message-id + threading (in-reply-to, references, is_reply), mailer, List-Unsubscribe (URLs, mailto, one-click), body text (text/plain or tag-stripped HTML, max_text= default 20,000), calendar invites, links (href targets with host counts and display-text vs target domain mismatch), attachments (filename, type, size, SHA-256, content sniffing, risk LOW/MEDIUM/HIGH for executables, macro Office files, double extensions, RTL-override names, HTML lures, PDF JavaScript, extension/content mismatch), Authentication-Results (SPF/DKIM/DMARC/ARC + domains), DKIM-Signature domains/selectors, Received hop chain with IPs, times and transit seconds, and the MIME part tree. flags[] call out display-name spoofing, Reply-To domain mismatch, SPF/DKIM/DMARC failures, unaligned DKIM, link text mismatches and risky attachments, rolled up into attention NONE/LOW/MEDIUM/HIGH. headers=true adds every header decoded. Offline, no AI, nothing stored. Price: $0.004 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "eml": "<eml>"
    },
    "name": "util_email_parse"
  }
}

Input Schema

NameRequiredDescriptionDefault
emlYesFrom: Alice Example <alice@example.com> To: Bob <bob@example.org> Subject: Lunch on Friday? Date: Wed, 25 Nov 2026 09:00:00 -0500 Message-ID: <20261125.1@example.com> Content-Type: text/plain; charset=utf-8 Hi Bob, are you free for lunch on Friday at noon? Menu: https://example.com/menu

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover safety (readOnlyHint=true, destructiveHint=false, openWorldHint=true), and the description goes well beyond them: a 1 MB input cap, a default max_text of 20,000 characters, the fact that a url= input causes a fetch, an explicit 'nothing stored' retention statement, and a stated price of $0.004 USDC via x402 — the auth/payment requirement an agent must know before calling.

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?

Purpose is front-loaded in the first clause and there is almost no filler. The long return-value enumeration is justified because no output schema exists, but the single run-on paragraph would read better segmented into input, returns, and flags.

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?

For a complex parser with no output schema and no annotations covering returns, the description enumerates the returned fields, the flags/attention rollup, the headers=true switch, and the MIME part tree. Nothing an agent needs in order to call it correctly and interpret the result is missing.

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?

With a single parameter at 100% schema coverage, the schema already shows an example message; the description still adds meaning the schema does not — the input must be URL-encoded, is capped at 1 MB, must include headers, and url= is an alternative source. It omits the encoding scheme name and what happens if both are supplied, so it stops short of a 5.

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 ('Parse a raw RFC 5322 email into clean JSON') and names the accepted formats (.eml / MIME). The sibling set makes the boundary clear: this parses a message body, whereas email_validate, email_spf_check and security_email_headers operate on addresses or headers.

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 explains how to supply input ('Pass eml= ... or url= ...') and implies the use case, but never states when to choose this over the sibling checkers or when not to use it (e.g., for a bare address string use email_validate). Usage is only implied, not scoped.

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.

Resources