Skip to main content
Glama

Agent Email Transactional Dispatcher (x402)

agent_preview_email

Read-onlyIdempotent

Read-only dry-run validation and Markdown-to-HTML compilation preview for autonomous AI agent emails (0.005 USDC via x402 on Base). Validates recipients and returns compiled HTML byte metrics without sending external emails.

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": {
      "to": "<to>",
      "subject": "<subject>"
    },
    "name": "agent_preview_email"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesRecipient email address (or comma-separated list of recipients)
htmlNoOptional raw HTML body override
textNoOptional plain text body fallback
replyToNoOptional Reply-To email address
subjectYesEmail subject line
markdownNoMarkdown email content (automatically compiled into responsive HTML email)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description's real value is the disclosure of a paid call — '0.005 USDC via x402 on Base' — which is a material operational constraint an agent must know before invoking. It also states what is returned (compiled HTML byte metrics) and what side effect is avoided (no external email sent), adding meaningful context beyond the annotation set.

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?

It is a single dense sentence with the core purpose front-loaded and no redundant restatement of the name. The parenthetical payment detail slightly interrupts the flow, but every clause carries information.

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?

With no output schema, the description supplies the return shape ('compiled HTML byte metrics'), the cost and payment rail, the validation behavior, and the no-send guarantee — everything an agent needs to decide whether and how to call it. The only residual gap, body-field precedence, is minor for a preview tool.

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 all six parameters are already documented, establishing a baseline of 3. The description adds only indirect meaning — noting that Markdown is 'compiled into responsive HTML' and that recipients are validated — but says nothing about precedence when html (override), text (fallback), and markdown are supplied together, which is the one ambiguity the schema leaves open.

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 names a specific verb and resource — 'dry-run validation and Markdown-to-HTML compilation preview' — and explicitly scopes it to 'autonomous AI agent emails' with the negative qualifier 'without sending external emails.' That negative qualifier functionally separates it from the sibling agent_send_email without needing to name it.

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 implied rather than stated: 'dry-run' and 'preview ... without sending external emails' signals this is a pre-flight check preceding a real send. However, it never says 'use this before agent_send_email' or gives any exclusion criteria, leaving the agent to infer the workflow ordering.

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