Skip to main content
Glama
Automata MCP

Automata MCP

Get email attachment

get-email-attachment
Read-onlyIdempotent

Fetches a specific email attachment by email ID and part, returning images as images, text files as text, and other files as embedded downloads for task-focused processing.

Instructions

[Email] Fetch one attachment of an email: an emailId from list-emails, search-emails or read-email, and a part from that email's attachment list. Images (PNG, JPEG, GIF, WebP) come back as images, text files (plain text, CSV, JSON, XML, HTML, calendar invites) as text, and anything else — PDFs, Office documents, archives — as an embedded file with its type. Attachments larger than the limit are refused with their size. Fetch only what the task needs: each call downloads the file from the mail server.

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": {
      "emailId": "<emailId>",
      "part": "<part>"
    },
    "name": "get-email-attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
partYesThe attachment's `part`, from the email's attachment list
emailIdYesThe emailId the attachment belongs to

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and a closed-world scope, so the safety profile is covered. The description adds real value on top: it specifies three distinct return modes by file type (image, text, embedded file with its type), the error behavior for oversized attachments ('refused with their size'), and the per-call network cost ('each call downloads the file from the mail server'). That is unusually rich behavioral detail beyond the structured fields.

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 dense sentences, front-loaded with the core action and inputs, then return behavior, then the cost caveat. No filler and no repetition of the schema.

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

Completeness5/5

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

No output schema exists, so the description must carry the return contract; it does so by describing the three response modes and the failure case for oversized files. For a two-parameter read tool with full annotation coverage, nothing needed to call it correctly is missing.

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 100%, so the baseline is 3. The description goes further by explaining the provenance of each value, tying part to the email's attachment list and emailId to three specific sibling tools, which tells the agent how to source valid inputs rather than just their format.

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 opens with a specific verb and resource: 'Fetch one attachment of an email.' It then names the sibling tools that supply the `emailId` (list-emails, search-emails, read-email), so the agent can distinguish this tool from those without opening any 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?

It clearly states the two prerequisites and where to obtain each value: the emailId from list-emails, search-emails or read-email, and the part from that email's attachment list. The line 'Fetch only what the task needs' adds a cost-based usage rule. It lacks an explicit when-not clause or a named alternative for retrieving attachments in bulk, which keeps it just short of a 5.

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