Skip to main content
Glama
weirdapps

sch-mail

by weirdapps

sch_download_attachments

Download attachments from a specified email message to disk, with optional folder, output directory, filename filter, and account selection.

Instructions

Download attachments from a message to disk.

Args: msg_id: Message UID from sch_list_mail / sch_search_mail folder: Mailbox folder (default: INBOX) out_dir: Directory to save files (default: ~/Downloads). Must lie inside the allowed folders (by default ~/Downloads and the temp dirs; SCH_MAIL_ALLOWED_DIRS replaces them). filename_filter: Only download files matching this substring (case-insensitive) account: Account key in credentials.json (e.g. "personal" or "work"). Default: the account named by "default" in that file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderNoINBOX
msg_idYes
accountNo
out_dirNo
filename_filterNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the allowed-directory restriction, default output directory, case-insensitive filtering, and account default logic, but it omits key mutation behaviors such as whether existing files are overwritten, error handling, or permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first sentence, followed by a well-organized Args block. Every sentence adds value, with no redundancy or filler.

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 five parameters, full schema coverage in the description, and an output schema that handles return values, the definition is largely complete for invocation. It still lacks some behavioral context expected when no annotations are present, such as overwrite semantics or failure modes.

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?

Schema description coverage is 0%, so the description must compensate, and it does thoroughly. Each of the five parameters is explained with its source, default, or constraint (e.g., msg_id UID source, out_dir allowed folders, filename_filter substring behavior, account key file).

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 first sentence gives a specific verb (Download) and resource (attachments from a message) and destination (to disk), clearly distinguishing this tool from siblings like sch_get_mail or sch_search_mail. An agent can immediately tell what the tool does without opening the schema.

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 provides clear context by stating that msg_id comes from sch_list_mail / sch_search_mail, and it documents defaults for folder, out_dir, and account. However, it does not explicitly state when to use this tool versus alternatives or any conditions where it should not be used.

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