Skip to main content
Glama
sean3808

bes-mcp

by sean3808

Export attachments to a host folder

mail_attachment_export
Idempotent

Copy stored email attachments by attachment ID to an absolute host directory and report each file's destination path and status.

Instructions

Copy stored attachments into a host directory and report where each one landed. attachment_ids are the attachment_id values from mail_attachments (or attachments[].id from mail_show / mail_thread), 1 to 50 per call; a repeated id is reported once. dest_dir must be an absolute host path of at most 200 characters, inside a folder you can read back; it is created if missing. Never overwrites: a file already at the destination is left untouched and reported as skipped-existing. Never exports a file type Windows runs when opened (.exe, .bat, .cmd, .lnk, .vbs, .js, .ps1, .msi, ...): those are reported as skipped-blocked-type and the user must save them from Outlook. A dest_dir inside the Startup folder or an Office startup folder is refused. Each item reports status exported, skipped-existing, skipped-non-exportable (no stored payload, metadata only), skipped-blocked-type, or failed, with the absolute dest_path. Returns paths, never file content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dest_dirYes
attachment_idsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=true) by disclosing the no-overwrite policy, blocked executable file types, refusal of Startup/Office-startup destinations, the full status enumeration, and the explicit statement that paths are returned but never file content. This is the behavioral detail an agent needs before committing a write.

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?

Front-loaded purpose sentence followed by tightly packed constraints, each of which carries load. Slightly long and the truncated file-type list ('...') plus the parenthetical status glosses make it denser than ideal, but there is no filler sentence.

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

Completeness5/5

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

For a 2-parameter write tool with an output schema, everything an agent needs is covered: valid id range, path constraints, side effects, failure taxonomy, and the fact that content is not returned. The output schema can carry the response shape, so the description need not restate it.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates: attachment_ids is scoped to 1-50 ids, sourced from specific fields, with duplicate handling defined; dest_dir must be an absolute host path, max 200 characters, readable-back, auto-created if missing, with forbidden locations enumerated.

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 (Copy/export) and resource (stored attachments) plus the destination (host directory) and the reporting behavior. It is distinguishable at a glance from sibling mail_attachments, which lists attachments rather than writing them to disk.

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?

The description grounds usage by naming where attachment_ids come from (mail_attachments, mail_show, mail_thread), which routes the agent through the right sibling tools first. It also states the preconditions for dest_dir. It never explicitly says when NOT to use this tool or names a direct alternative for the export step.

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