Skip to main content
Glama

Save attachment

save_attachment

Save an email attachment directly to the attachment folder as a new file instead of returning its content. Provide a relative path; existing files are never overwritten.

Instructions

Save one attachment as a new file in the attachment folder, instead of returning its content. Give the path relative to the folder. The file mustn't exist yet: Fluxmail never replaces one. No part of the path may start with a dot. The attachment size limit does not apply.

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>",
      "path": "<path>"
    },
    "name": "save_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesNew file name, relative to the folder
accountIdNoAccount to operate on. Optional when exactly one account is connected.
messageIdYes
attachmentIdYesOpaque attachment ID returned by message metadata

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.33.0

TDQS

A4.6/5.0
Behavior5/5

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

Far exceeds the annotations: it discloses that the target file must not already exist, that Fluxmail never replaces files, the hidden-dot prefix restriction on path segments, and that the size limit does not apply. These are non-obvious constraints an agent could not infer from destructiveHint/openWorldHint alone, and they prevent failed calls.

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?

Four short sentences, each carrying a distinct constraint, front-loaded with the core action before the caveats. Nothing is redundant or padded.

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?

Output schema exists and annotations cover safety, so omitting return values is fine; the description fills in the meaningful write constraints. Only minor gap is that messageId's role (where the attachment comes from) is left implicit, which is acceptable given the sibling context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75% with path already documented, yet the description adds real constraint detail for path (folder-relative, must not exist, no dot-prefixed segments) beyond the schema's 'New file name, relative to the folder'. It does not touch accountId/messageId semantics, but those are already covered by the schema and are self-evident.

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?

States a specific verb+resource ('Save one attachment as a new file in the attachment folder') and immediately distinguishes the case from returning content, which is the key contrast against download_attachment. An agent can pick this over the sibling without opening either 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?

'instead of returning its content' gives a clear use case: persist the attachment rather than fetch it. It does not explicitly name download_attachment or state exclusions, but the contrast plus the folder-relative path instruction makes the intended context unambiguous.

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