Skip to main content
Glama
ergofobe

gmail-sendas

by ergofobe

get_attachment

Retrieve Gmail attachment bytes by message and attachment ID, decode base64url data, and optionally save to a local file.

Instructions

Download Gmail attachment bytes (GET users.me.messages.attachments). Stock Gmail MCP cannot return file bytes. Decodes base64url; writes to disk when path is set; returns size, filename, attachmentId, and standard base64.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoIf set, write decoded bytes to this file (or directory)
filenameNo
messageIdYes
attachmentIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

There are no annotations, so the description carries the full burden. It states that it decodes base64url, writes to disk when path is set, and returns size, filename, attachmentId, and standard base64. This is useful behavioral disclosure, though it leaves some edge behavior (e.g., directory vs file path handling, errors) unspecified.

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?

The description is three sentences with no filler. It front-loads the core purpose, then adds valuable technical context about the workaround, decoding, disk writing, and return values. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, this definition is reasonably informative but still incomplete. It covers the main behavior and return fields, but leaves path semantics ambiguous ('file (or directory)'), does not explain the filename parameter, and does not address authentication or failure modes. It is adequate for basic invocation but not fully self-contained.

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

Parameters2/5

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

Schema description coverage is only 25%, so the description must compensate. It reinforces the path parameter behavior, but it does not explain the expected roles of messageId, attachmentId, or filename. The names are suggestive, but the description does not clarify how these inputs map to the API call or how filename interacts with path.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the verb and resource: 'Download Gmail attachment bytes' with the specific API endpoint. It is immediately obvious what the tool does even though the sibling tools (list_send_as, send_as) are unrelated. It does not explicitly differentiate from those siblings, but the explicit endpoint and comparison to 'Stock Gmail MCP' provide strong clarity.

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 gives clear context for use: use this tool when attachment bytes are needed, especially because 'Stock Gmail MCP cannot return file bytes.' It does not provide explicit exclusions or say when not to use it, but the context is sufficient to guide an agent for this Gmail attachment scenario.

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