Skip to main content
Glama
mail-mcp

mail-mcp

get_message

Read-only

Fetches one message's headers, plain-text body, and attachment details without marking it as read. Use it to inspect email content and attachments before deciding on actions.

Instructions

Get one message: headers, plain-text body (HTML converted to text, truncated to max_chars, default 20000, must be at least 1) and attachment metadata (part, filename, type, size). Does not mark it as read. size is the server's RFC822.SIZE; size_fetched appears when the fetched bytes differ.

URLs longer than 80 chars (mostly tracking links) are shortened to their host ("example.com/…") and
label-less long links are dropped; links_shortened reports how many. full_links=true keeps every URL.

The body is wrapped in an untrusted-content envelope (see the server instructions); body_chars and
body_truncated describe the text inside it. HTML text that a mail client would not display
(display:none, zero font size, white on white, ...) is removed and reported in hidden_content.
content_trust carries: invisible_chars_removed, from_is_self, sender_authentication (spf/dkim/dmarc
as the message's Authentication-Results header states them) and, when they apply,
reply_to_differs_from_sender and alternative_mismatch. Attachment filenames are sanitised.

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": {
      "account": "<account>",
      "uid": "<uid>"
    },
    "name": "get_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
uidYes
folderNoINBOX
accountYes
max_charsNo
full_linksNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

Annotations say only readOnlyHint/openWorldHint; the description adds substantial behavior beyond that: non-mutating read semantics, truncation with a default of 20000, URL shortening and dropping of long label-less links, HTML-to-text conversion, removal of hidden HTML content, and attachment-filename sanitisation. It also warns the body sits in an untrusted-content envelope, which is exactly the kind of safety context structured fields cannot carry.

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?

Despite its length, the text is front-loaded with the core contract and every sentence contributes a distinct fact about returned fields or transformations. Some density could be trimmed (the parenthetical list of hidden-content CSS tricks), but there is no filler.

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?

There is no output schema, so the description must describe the response shape itself, and it does: size vs size_fetched, body_chars, body_truncated, links_shortened, hidden_content, content_trust subfields, and attachment metadata. For a read-only fetch with sanitisation side effects, an agent has everything needed to interpret the result.

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 0%, so the description carries the burden. It fully explains max_chars (default, minimum 1, truncation effect) and full_links, but leaves uid, account, and folder (default INBOX) entirely to the bare schema titles. Two of five parameters are well served; the rest are only self-evident from name.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Get one message" names a specific verb and resource, and the parenthetical enumerates exactly what comes back (headers, text body, attachment metadata). It does not explicitly contrast with the sibling get_thread, so the single-message scope is implied rather than stated.

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?

There is incidental routing information ("Does not mark it as read" implies the mark_read sibling, and full_links is framed as the opt-out of link shortening), but no explicit statement of when to call this versus get_thread or search_messages. The reader must infer selection criteria.

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