Skip to main content
Glama
langmail-mcp

langmail-mcp

Official
by langmail

Preview email

preview_email
Read-onlyIdempotent

Display an email inline as a rendered document so users can visually inspect QR codes, barcodes, table layouts, tickets, boarding passes, invoices, or receipts; use get_email for content extraction.

Instructions

Show one email to the user as a rendered document, inline in the conversation. Use it when the user asks to see, show, or display an email or a document contained in one — tickets, boarding passes, invoices, receipts — where the visual rendering (QR codes, barcodes, table layouts) is the point. Use get_email instead when you need the content for reasoning, summarization, or extraction and the user does not need the pixels. The result gives the model only compact metadata; the rendered body is shown to the user by the client and is not in your context — do not claim to have read it from this call.

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": {
      "id": "<id>"
    },
    "name": "preview_email"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe message id, as returned by search_emails or get_thread.

Output Schema

NameRequiredDescriptionDefault
dateYes
fromYes
tagsYesThe message tags ($type/$label), e.g. "ticket" or "receipt".
subjectYes
renderSourceYesWhether the preview shows the HTML part or a plain-text fallback.
attachmentCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already establish a safe, idempotent read, but the description adds a non-obvious behavioral fact the annotations cannot convey: the call returns only compact metadata to the model, the rendered body lives in the client, and the model must not claim to have read it. That directly prevents a hallucination class and is exactly the context annotations cannot supply.

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

Conciseness5/5

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

Front-loads the action and scope, then the trigger conditions, then the alternative, then the critical caveat about what the model actually receives. Every sentence carries distinct decision-relevant information with no restatement of the name or schema.

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 single-parameter read tool with an output schema, the description covers the remaining gaps: what the user sees versus what the model sees, and the anti-hallucination instruction. Nothing an agent needs to call this correctly or report its result accurately is missing.

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 coverage is 100% and the single 'id' parameter is already documented in the schema as coming from search_emails or get_thread. The description adds no format or constraint detail beyond that, so the baseline 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 ('Show one email to the user as a rendered document, inline in the conversation') and immediately names the sibling it is not: get_email. The distinction is functional (visual rendering vs. content for reasoning), so an agent can choose without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use triggers ('user asks to see, show, or display an email or a document contained in one') with concrete examples, plus an explicit when-not-to-use rule routing to get_email when content is needed for reasoning, summarization, or extraction. Both directions of the decision are covered.

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