Skip to main content
Glama
MCP Aruba Email & Calendar Server

MCP Aruba Email & Calendar Server

by eteocuenca

save_attachment

Downloads an email attachment and saves it directly to disk, returning the local file path so users can open it immediately.

Instructions

Download an email attachment and save it directly to disk.

This is the PREFERRED tool for attachments — saves the file and returns the local path so the user can open it immediately. No base64 decoding needed.

Args: email_id: Email ID attachment_index: Index of attachment (from get_email_attachments, starting at 0) folder: Mail folder (default: INBOX) save_dir: Directory to save into (default: user's Downloads folder)

Returns: Dictionary with filename, saved_path, content_type, and size

Example: save_attachment(email_id="123", attachment_index=0)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "email_id": "<email_id>",
      "attachment_index": "<attachment_index>"
    },
    "name": "save_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
folderNoINBOX
email_idYes
save_dirNo
attachment_indexYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It discloses that the tool writes to disk, returns filename/saved_path/content_type/size, and avoids base64, which is real value. It does not state what happens on filename collisions, whether directories are created, permission requirements, or size limits for a filesystem-mutating operation.

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 with the core action and the preferred-tool claim, then Args/Returns/Example in a scannable structure. The docstring block repeats the folder and save_dir defaults in a way that slightly contradicts the schema, but overall little wasted text.

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?

An output schema exists, yet the description still usefully summarizes return fields, and all four parameters get some explanation plus a concrete example call. For a simple save operation this is nearly complete; only edge-case behavior such as overwrites and directory creation is missing.

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 coverage is 0%, so the description must document all four parameters; it does list each one, including the useful 'starting at 0' and the get_email_attachments provenance for attachment_index. However, its claim that save_dir defaults to the user's Downloads folder conflicts with the schema's empty-string default and doesn't explain how empty resolves to that path, leaving one parameter semantically murky.

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?

States a specific verb and resource: 'Download an email attachment and save it directly to disk.' An agent knows exactly what the tool does. It hints at a sibling by claiming to be 'PREFERRED for attachments' but never names download_attachment, so the distinction from that sibling stays implicit.

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?

Gives clear context: preferred tool, saves the file and returns a local path, no base64 decoding needed, and points to get_email_attachments as the source of attachment_index. It lacks an explicit when-not clause or a direct comparison naming download_attachment, which would make routing between the two unambiguous.

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