Skip to main content
Glama
borystam

homepl-email-mcp

by borystam

mail_download_attachment

Read-onlyIdempotent

Download any MIME part by exact partId from a message, including binary attachments, inline images, and attached emails. Returns a private file path, byte size, and SHA-256 hash.

Instructions

Stream any MIME part by exact partId from mail_get_message (not by filename), including binary attachments, inline images and attached emails. Duplicate filenames remain unambiguous. Saves privately and returns path, bytes and SHA-256. Transfer encodings are decoded; inline text may be normalized for display. Use mail_download_raw for original encoded bytes. Results exceeding 64 KiB are saved completely to a private JSON file and return a compact summary with completeResultFile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYes
folderYes
partIdYes
accountIdYes
uidValidityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial behavior beyond them: private saving, decoded transfer encodings, possible display normalization of inline text, and the >64 KiB overflow path that writes a private JSON file and returns completeResultFile. This is exactly the kind of non-obvious side effect an agent needs.

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?

Four tight sentences, front-loaded with the identity and scoping rule before the overflow and encoding details. 'Duplicate filenames remain unambiguous' slightly restates the 'not by filename' clause, but the rest earns its space.

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, the description correctly supplies the return contract (path, bytes, SHA-256, completeResultFile summary) and the large-result behavior. It is close to complete, missing only guidance on invalid/stale partId or uidValidity mismatch failure modes.

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 0%, so the description must carry the load. It clarifies partId richly (exact dotted part path, unambiguous despite duplicate filenames), but says nothing about accountId, folder, uid, or the uidValidity pairing — four required IMAP parameters whose relationship is not self-evident from the schema.

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?

States a specific verb and resource ('Stream any MIME part by exact partId') and immediately scopes it against the sibling 'mail_download_raw' by contrasting decoded vs. original bytes. An agent can distinguish this from every other mail_* sibling without opening a schema.

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?

Gives explicit selection criteria: use partId from mail_get_message rather than a filename, and use mail_download_raw when original encoded bytes are wanted. Both the when and the when-not (with the named alternative) are present.

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