Skip to main content
Glama

imap_get_message

Read-onlyIdempotent

Retrieve parsed email message details by ID, including headers, optional sanitized HTML, and PDF attachment text, with configurable character limits.

Instructions

Get parsed message details

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": {
      "message_id": "<message_id>"
    },
    "name": "imap_get_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
account_idNoAccount identifier (defaults to `"default"`)default
message_idYesStable message identifier (format: `imap:{account}:{mailbox}:{uidvalidity}:{uid}`)
include_htmlNoInclude sanitized HTML body
body_max_charsNoMaximum body characters (100..20000, default 2000)
include_headersNoInclude headers in response
include_all_headersNoInclude all headers (if `true`, overrides curated header list)
extract_attachment_textNoExtract text from PDF attachments
attachment_text_max_charsNoMaximum attachment text length (100..50000, requires `extract_attachment_text=true`)

Output Schema

NameRequiredDescriptionDefault
dataYesTool-specific data payload
metaYesExecution metadata (timestamp, duration)
summaryYesHuman-readable summary of the operation outcome

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.12

TDQS

C2.5/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so safety is covered structurally. The description adds no behavioral context of its own — not that bodies are truncated by default (2000 chars), that HTML is sanitized and off by default, or that attachment extraction requires an opt-in flag; all of that lives only in the schema.

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

Conciseness3/5

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

The phrase is front-loaded and free of waste, but at five words it is undersized for an eight-parameter tool with a raw-MIME sibling. Conciseness is achieved at the cost of specification rather than through economy.

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

Completeness2/5

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

An output schema exists, so return values need not be explained, and the input schema is rich. Still, for a tool with eight parameters sitting next to imap_get_message_raw, the description should at minimum say what "parsed" means and when the raw variant is the right call; that omission leaves a real gap.

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 the eight parameters, their defaults and their bounds are already fully documented in structured data. The description adds nothing on top, which meets the baseline for a fully-covered schema but earns no extra credit.

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

Purpose3/5

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

"Get parsed message details" names a verb and resource, and the word "parsed" hints at a distinction from the sibling imap_get_message_raw. However, that contrast is never made explicit, and the description gives no sense of what "details" encompasses (headers, body, attachments) beyond what the schema already lists.

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

Usage Guidelines2/5

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

There is no when-to-use guidance at all: nothing says to prefer this over imap_get_message_raw, nothing states prerequisites such as a valid message_id from a search, and no context indicates which sibling to pick for raw MIME access.

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