save_attachment
Download a single email attachment by message and attachment ID, saving it to the server's allowed local folder without overwriting existing files and returning the saved path.
Instructions
Download one attachment from a message and save it to the local filesystem. Writes are confined to the server's allowed directory (default ~/Downloads/outlook-mcp/). Existing files are never overwritten — the tool appends ' (2)', ' (3)', … to the filename. Returns the absolute path of the saved file.
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": {
"messageId": "<messageId>",
"attachmentId": "<attachmentId>"
},
"name": "save_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| messageId | Yes | The Graph message ID that contains the attachment. | |
| attachmentId | Yes | The Graph attachment ID (from read_email's 'attachments' list). | |
| targetFilename | No | Optional filename override. If omitted, the original attachment filename is used. Must be a bare filename — no path separators, no parent traversal. The destination directory is fixed by the server's OUTLOOK_MCP_ALLOWED_DIR setting and is not LLM-controllable. |