Skip to main content
Glama

imap_get_message

Retrieve a parsed email message by ID with configurable body length, optional HTML, headers, and attachment text extraction.

Instructions

Get parsed message details

Input Schema

TableJSON 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

TableJSON 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.9/5.0
Behavior2/5

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

No annotations are present, so the description carries the full burden. It only states 'Get parsed message details', without disclosing whether the operation has side effects (e.g., marking messages as read), what happens on missing messages, or any rate limits/auth requirements. The phrase 'parsed' hints at processing, but most behavioral context is left to 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.

Conciseness4/5

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

The description is a single short sentence with no filler words, so it is concise. However, it is so minimal that it does little more than restate the tool's function; there is no structured context beyond the one phrase.

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?

With 8 parameters, no annotations, and many sibling tools, the one-sentence description is insufficient. The output schema covers return values, but the description does not explain how this tool fits among `imap_get_message_raw`, `imap_get_attachment`, `ews_get_message`, or when the various enrichment flags are appropriate.

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 baseline is 3. The tool description itself adds no parameter-level meaning; all parameter semantics are already in the schema.

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?

The description uses a specific verb ('Get') and resource ('parsed message details'), making the core function clear. However, it does not distinguish itself from sibling tools such as `imap_get_message_raw` or `ews_get_message`, so the agent cannot tell exactly what makes this variant unique.

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 mention of when to choose this tool over alternatives like `imap_get_message_raw`, `imap_get_attachment`, or `ews_get_message`. No conditions, exclusions, or routing advice are provided.

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