Skip to main content
Glama
nabheet

google-services-mcp

by nabheet

Get email attachment

google_gmail_get_attachment

Download a Gmail attachment by message ID and attachment ID. Text files are returned as text, binary files as base64.

Instructions

Download a single attachment by message ID and attachment ID. Text-like files are returned decoded as text; binary files as base64.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesMessage ID.
partIdNoStable part ID (from list_attachments); preferred over attachmentId for lookup.
accountNoAccount nickname to use.
attachmentIdYesAttachment ID (from list_attachments).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.30

TDQS

A4/5.0
Behavior4/5

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

With no annotations and no output schema, the description carries the behavioral disclosure burden. It adds genuinely useful behavior beyond the schema: text-like files are decoded and returned as text, while binary files are returned as base64. This clarifies the output format, though it does not cover error cases, authentication, or response envelope details.

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?

Two short sentences, no filler, and the core action is front-loaded in the first sentence. Every phrase ('single attachment', 'decoded as text', 'binary files as base64') earns its place.

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?

For a simple retrieval tool, the description plus 100%-covered schema is nearly complete: an agent knows what to call, which parameters are required, and what kind of content to expect. It could be improved by explicitly pointing to google_gmail_list_attachments as the prerequisite source of attachment IDs, but that is already hinted in the schema property descriptions.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already explains id, partId, account, and attachmentId. The description only restates that a message ID and attachment ID are needed and adds no extra meaning beyond the schema, so it stays at the baseline.

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?

The description names a specific verb ('Download'), a precise resource ('a single attachment'), and the two identifiers required ('message ID and attachment ID'). This clearly distinguishes it from siblings like google_gmail_list_attachments (which lists attachments) and google_gmail_get (which retrieves a message).

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?

The description implies the intended use case — fetching an attachment after obtaining its IDs — but it never explicitly names alternatives or says when not to use this tool. There is no guidance such as 'use list_attachments first' or 'for the full message body, use google_gmail_get instead'.

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

Deploy Server

Other Tools