Skip to main content
Glama
gmail-mcp
by gchallen

save_attachments

Download Gmail message attachments to a local directory and return the written paths; filter by filename or attachment ID, and avoid overwriting existing files unless enabled.

Instructions

Download attachments from a message to a local directory and return the written paths. All regular attachments by default; narrow with filenameContains or attachmentId. Existing files are not overwritten unless overwrite is set (a numbered copy is written instead).

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>",
      "directory": "<directory>"
    },
    "name": "save_attachments"
  }
}

Input Schema

NameRequiredDescriptionDefault
directoryYesDirectory to write into; created if missing.
messageIdYes
overwriteNo
attachmentIdNoSave exactly this attachment (from list_attachments).
includeInlineNoAlso save inline images (signature logos and the like). Default false.
filenameContainsNoCase-insensitive substring filter on the filename.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2026.9.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, openWorldHint=true, destructiveHint=false, and the description adds non-obvious behavior the annotations cannot convey: existing files are preserved and a numbered copy is written instead unless overwrite is set. It also discloses the return value (written paths). It does not cover failure modes (missing message, unwritable directory) or partial-save behavior, which keeps it below 5.

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?

Three tight sentences: what it does and returns, then scoping defaults, then the overwrite rule. The most decision-relevant information (scope and the non-destructive overwrite default) is front-loaded with no filler.

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?

With six parameters, no output schema, and only 67% schema coverage, the description carries a fair share and does so for the risky parts (write behavior, overwrite policy, returned paths). An agent could call it correctly from this text; only error and directory-handling edge cases are unaddressed.

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 67%, so the schema documents most parameters; the description nonetheless adds meaning beyond it by framing attachmentId and filenameContains as narrowing filters against the default all-regular-attachments behavior, and by explaining what overwrite actually does (numbered copy otherwise). includeInline and messageId semantics are left entirely to the schema.

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?

"Download attachments from a message to a local directory and return the written paths" names a specific verb (download), a specific resource (attachments from a message), and the side effect plus return value. This is clearly distinguishable from the sibling list_attachments, which enumerates rather than writes files.

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?

The description states the default scope ("All regular attachments by default") and the two narrowing options (filenameContains or attachmentId), which is real when-to-use guidance. It stops short of naming a prerequisite workflow such as calling list_attachments to obtain an attachmentId — that hint only appears in the schema — and offers no when-not-to-use case.

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