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.
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": {
"path": "<path>"
},
"name": "open_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| pattern | No | .* | |
| open_in_viewer | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |