Skip to main content
Glama

API Keg — MailPreflight Email QA & Deliverability

Extract Plain-Text MIME Fallback

extract_plain_text_fallback
Read-onlyIdempotent

Converts an HTML email into a clean, RFC 5322-wrapped text/plain MIME companion, preserving CTA links inline as 'Label (https://...)' and stripping invisible ͏ / ‌ preheader padding hacks. Pricing: $0.001 USD per HTML-to-plain-text MIME fallback conversion (x402 instant micropayment). Pass ?dry_run=true on REST to validate schema free.

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": {
      "html": "<html>"
    },
    "name": "extract_plain_text_fallback"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesHTML email body to convert into a formatted text/plain MIME fallback with inline CTA URLs and stripped preheader padding.
wrapWidthNoSoft line-wrap width in characters (default 78 per RFC 5322; URLs are never split).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so safety is covered structurally. The description adds genuinely new behavior: a $0.001 USD per-conversion x402 micropayment charge and a free dry_run validation path on REST, which an agent must know before invoking a paid operation. It does not state failure modes or how the MIME wrapper is structured, keeping it short of a 5.

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?

Three dense sentences, front-loaded with the transformation and its two notable behaviors, followed by cost and validation. Pricing and dry_run details earn their place because they affect invocation decisions; the sentence is slightly packed with REST-specific syntax, but nothing is redundant.

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

Completeness4/5

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

With rich annotations, 100% schema coverage, and no output schema, the description carries the burden of describing the return shape, which it does via the MIME companion and inline-link format. Cost and dry_run disclosure round out what an agent needs to call it correctly; only error/edge-case behavior is absent, which is minor for a deterministic conversion.

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 description coverage is 100%, so both html and wrapWidth already carry documented semantics including defaults, bounds, and the guarantee that URLs are never split. The description reinforces the output conventions ('Label (https://...)', RFC 5322 wrapping) but adds no parameter-level detail beyond the schema, so the baseline of 3 applies.

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 ('Converts an HTML email into a clean, RFC 5322-wrapped text/plain MIME companion') plus the two transformations that define the result: inline CTA links as 'Label (https://...)' and removal of &#847;/&zwnj; preheader padding. This is clearly distinct from the sibling audit_email_template, which audits rather than converts.

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?

Usage is only implied by the nature of the operation – an agent infers it should call this when it needs a plain-text MIME fallback for an HTML email. No explicit when-to-use or when-not-to-use guidance is given, and no alternative is named; the only explicit directive is the REST ?dry_run=true self-check, which is a validation nicety rather than tool selection guidance.

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