Skip to main content
Glama

parse_eml_headers

Extract MIME headers from .eml files to analyze email threads, retrieving message IDs, subjects, sender/recipient details, and dates for correlation.

Instructions

Extract MIME headers from an .eml file for email thread correlation. Returns message_id, in_reply_to, references (array), subject, from, to, cc, and date. Handles CRLF/LF line endings, folded headers, and RFC 2047 encoded words in Subject/From/To. Input: { "filePath": "/path/to/email.eml" }

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": {
      "filePath": "<filePath>"
    },
    "name": "parse_eml_headers"
  }
}

Input Schema

NameRequiredDescriptionDefault
filePathYesAbsolute path to the .eml file to parse

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.0.1

TDQS

A4.4/5.0
Behavior5/5

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

No annotations provided, so description carries full burden. It discloses return fields (message_id, in_reply_to, etc.) compensating for missing output schema, and details specific parsing behaviors: CRLF/LF handling, folded headers, and RFC 2047 encoded word support.

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?

Four sentences front-loaded with purpose first. Each sentence earns its place: purpose, return values, behavioral details, and input example. Minor deduction as the input example is slightly redundant given complete schema coverage, though still helpful.

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?

Comprehensive for a single-parameter parsing tool. Compensates for missing output schema by enumerating all returned fields and compensates for missing annotations by detailing RFC compliance behaviors (2047, folded headers, line endings).

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?

Schema has 100% description coverage ('Absolute path to the .eml file to parse'), establishing baseline 3. Description adds an input example but no additional semantic constraints (e.g., file extension requirements, path validation rules) 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 uses specific verb 'Extract' with clear resource 'MIME headers from an .eml file' and specific use case 'for email thread correlation'. It clearly distinguishes from all siblings which are database/record management tools with no email parsing functionality.

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?

Provides clear context with 'for email thread correlation' indicating the specific use case. However, lacks explicit when-not-to-use guidance or named alternatives (though no email parsing siblings exist to compare against).

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