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 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

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

A3.6/5.0
Behavior4/5

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

Annotations already declare this as a safe, idempotent, closed-world read (readOnlyHint/idempotentHint/destructiveHint=false), so the description doesn't need to restate the safety profile. It adds genuinely useful behavior the annotations can't carry: IMAP ids encode folder+UID and change on move or draft update, so the last returned id must always be reused, plus explicit 'never pass' guidance (subject, stale ids, RFC Message-ID). It still says nothing about result ordering or pagination behavior.

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 purpose sentence and the IMAP fallback are front-loaded and well ordered. However, the bulk of the text is generic provider-ID/reply-reference/thread-ID boilerplate that is repeated across email tools and is only tangentially about a resolution tool, which dilutes the signal for an agent reading this specific definition.

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?

With no output schema and 0 required parameters, the description does convey what the tool returns (email candidates with provider id and thread_id) and how to obtain each id, which is reasonably complete for a read-only resolver. The remaining gap is parameter-level meaning for the seven undocumented filter/pagination inputs.

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% (account_id alone) across 8 parameters, so the description carries the burden and does not meet it. It never names or explains to, from, any_email, after, before, limit or cursor, and the words 'sender, recipient, subject or date' are only loosely suggestive of to/from/any_email/date filters. An agent must guess at the filter semantics and at how limit/cursor interact.

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 opening sentence names a specific verb+resource (search/list email candidates) and a concrete outcome (mapping a human reference like sender, recipient, subject or date to an exact email_id) ahead of downstream read/reply/trash/move operations. It is clearly distinct in intent from a plain listing tool. It stops short of explicitly contrasting itself with the very similar email_list_messages sibling, which it only cites as a source of ids.

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

Usage Guidelines4/5

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

It states when to use the tool (to resolve a human reference before read/reply/trash/move/attachment operations) and gives an explicit alternative path for one case: on generic IMAP, when account-wide listing is unavailable, use email_list_folders then email_list_folder_messages. There is no general when-not guidance for the non-IMAP case, so no exclusions for Gmail/Outlook users.

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.