Email backend binding plugin for mcpg. Sends mail over SMTP (lettre) and reads a mailbox over IMAP (async-imap) as MCP tools/resources — over rustls TLS (STARTTLS / implicit) or plaintext. The message is built from / projected to the tool arguments.
Two tools with clear names (mail.send, mail.read) and adequate descriptions (60-90 chars each). Input schemas present with typed parameters and descriptions. However, output schemas are not documented in the source code provided, and parameter descriptions lack detail on constraints, formats, and error recovery guidance. No evidence of error handling patterns or recovery guidance. Naming follows verb_noun convention appropriately.
Read recent messages from a mailbox over IMAP. Fetches the most recent messages (newest last), read non-destructively (BODY.PEEK).
Send a message over SMTP. The message is built from the call arguments (to / subject / body).
Output schemas not documented. LLMs cannot plan downstream operations or extract required fields from mail.send (success indicator, message ID) or mail.read (message structure, field names).
Parameter descriptions lack actionable constraints. 'mailbox name' and 'limit' lack format guidance, valid ranges, or defaults. 'to', 'subject', 'body' lack length limits or format requirements (e.g., is HTML allowed in body?).
No error handling guidance. Descriptions do not explain failure modes (invalid email, SMTP auth failure, mailbox not found) or recovery steps. LLMs cannot self-correct on failures.
mail.send lacks idempotency guidance. No mention of whether repeated calls with identical parameters produce duplicate sends or are safely idempotent. Agents retry on ambiguous failures, non-idempotent tools risk duplicate emails.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 57 | 2026-07-28+ | v2 |
mail.read lacks pagination guidance. No mention of how 'limit' interacts with total message count, whether results are sorted, or how to fetch older messages. Large mailboxes may exceed context window.