Skip to main content
Glama

open_attachment

Save email attachments to a temp directory, optionally open them, and return file paths for reading.

Instructions

Save attachments of an email to a temp dir, optionally opening them.

Returns the saved file paths, so their contents can be read afterwards.

Args: path: message file path. pattern: case-sensitive PCRE matched against attachment file names, e.g. .*\.pdf$ or (?i)invoice. Default: all attachments. open_in_viewer: also open each file with the OS default application.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
patternNo.*
open_in_viewerNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.1

TDQS

A3.8/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 that files land in a temp dir and that open_in_viewer launches the OS default application (a real side effect), but it says nothing about overwrite behavior in the temp dir, permissions, or what happens when no attachment matches.

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, followed by a useful return-value note and a clean Args block. Slightly more verbose than strictly necessary, but every line adds information and nothing is repeated.

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, so return-value detail is not required, and the description still notes that file paths come back. All three parameters are explained despite 0% schema coverage. Only the lack of sibling routing and failure-mode context keeps it from a 5.

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 coverage is 0%, so the description must compensate, and it does: path is identified as a message file path, pattern is described as case-sensitive PCRE matched against attachment names with concrete examples and its default, and open_in_viewer is explained as opening each file with the OS default app.

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?

The description states a specific verb and resource: save an email's attachments to a temp dir, with optional opening. It is clearly distinct from list_attachments in intent (save/dump vs. list), although it never names that sibling to make the distinction explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: 'Returns the saved file paths, so their contents can be read afterwards' hints at the workflow (save, then read). There is no explicit when-to-use/when-not guidance and no pointer to list_attachments or view_emails for the cases where saving is unnecessary.

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