Skip to main content
Glama

Email: Resolve message

email_resolve_message
Read-onlyIdempotent

Search/list email candidates so a human reference such as sender, recipient, subject or date can be mapped to exact email_id before read/reply/trash/move/attachment operations. For generic IMAP, if account-wide listing is unavailable, use email_list_folders then email_list_folder_messages instead. Email provider ID: Exact email ID returned by Nilyo/Unipile for the connected mailbox. On IMAP (and Exchange over IMAP) the ID encodes folder + UID: it CHANGES when the email is moved or a draft is updated; always reuse the id returned by the last operation. Obtain with: email_list_messages or email_list_folder_messages -> email.id; the id returned by email_move_or_label / email_update_draft after a change Never pass: RFC Message-ID unless a tool explicitly documents it, subject, an email_id captured before a move/update on IMAP. Email reply reference: For Gmail/Outlook normally use the provider email id. For generic IMAP, reply_to_message_id may be the RFC822 Message-ID returned in the email data. Obtain with: email_read_message -> inspect id and provider/RFC Message-ID fields Never pass: subject, sender email address. Email thread ID: Exact thread/conversation id returned by the email provider when available. Obtain with: email list/read result -> thread_id Never pass: email_id unless equal according to returned data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNo
fromNo
afterNo
limitNo
beforeNo
cursorNo
any_emailNo
account_idNoOptional Nilyo connection ID (unipile_account_id from list_connected_accounts). Omit when the user has one account for this provider. When several exist, Nilyo never guesses: list them (display name, identifier, provider user ID), choose the one the user named or ask, and pass its ID here.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnlyHint and idempotentHint annotations, the description discloses critical behavioral traits: IMAP IDs encode folder+UID and change when emails are moved or drafts updated, so the last returned ID must always be reused. It also explains how to obtain correct IDs (via email_list_messages or email_list_folder_messages) and what never to pass (RFC Message-ID, subject, stale ID). This adds significant value over the structured annotations.

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 well-structured into sections (overview, provider ID, reply reference, thread ID) and front-loads the core purpose. However, it is quite long and somewhat dense, with technical caveats that could be condensed. Every sentence carries relevant information, but the length may reduce scannability for an agent.

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

Completeness4/5

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

Given the 8-parameter schema with no output schema, the description covers many important edge cases: provider differences (Gmail/Outlook vs IMAP), ID stability, and alternative tools. However, it does not describe the return format (e.g., whether output is a list of candidates with id, subject, sender fields), which is needed since there is no output schema. It also leaves parameter semantics for from/to/before/after/limit/cursor unexplained, so completeness is good but not perfect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 13% (only account_id is described), so the description must compensate for the other seven parameters. It mentions 'sender, recipient, subject or date' as human references, but does not explicitly map them to schema properties (from, to, any_email, after, before). It also does not explain limit, cursor, or the meaning of any_email. The description provides no concrete parameter-level semantics, leaving agents to guess.

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 clearly states the tool's purpose: 'Search/list email candidates so a human reference such as sender, recipient, subject or date can be mapped to exact email_id before read/reply/trash/move/attachment operations.' This distinguishes it from siblings like email_list_messages or email_read_message by focusing on resolving references to IDs. It also names the specific use case and alternative tool, making it easy for an agent to select correctly.

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?

The description provides explicit usage guidance: 'For generic IMAP, if account-wide listing is unavailable, use email_list_folders then email_list_folder_messages instead.' It also gives detailed do/don't instructions for obtaining and passing email provider IDs, reply references, and thread IDs, including warnings about IMAP IDs changing after moves/draft updates. This is strong when-to-use and when-not-to-use guidance.

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.