Skip to main content
Glama
langmail-mcp

langmail-mcp

Official
by langmail

Download attachment

download_attachment
Read-onlyIdempotent

Get a short-lived URL to download a single email attachment by emailId and blobId from search or thread results. Saves large files out-of-band; the link expires in 24 hours.

Instructions

Get a short-lived download URL for one email attachment, identified by the emailId + blobId that search_emails, get_thread, or get_email lists. The result is metadata plus a URL — never the file content. Save the file to disk out-of-band, e.g. curl -sS -o '<filename>' '<url>'; do not fetch the URL into the conversation, the file may be large. The URL expires after 24 hours — re-call this tool for a fresh one. For the whole message as an .eml file use download_email 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": {
      "blobId": "<blobId>",
      "emailId": "<emailId>"
    },
    "name": "download_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
blobIdYesThe attachment blobId, as listed by search_emails, get_thread, or get_email for that message.
emailIdYesThe id of the message the attachment belongs to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds real behavior beyond them: the response is metadata plus a URL and never file content, the URL expires after 24 hours and must be re-obtained, and large payloads should not be pulled into context. It stops short of describing the metadata fields themselves, but with no output schema that is a minor gap for a two-parameter retrieval tool.

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?

Front-loaded with what the tool returns before the operational instructions, then the expiry caveat, then the disambiguation. Every sentence carries a distinct, load-bearing fact and there is no restatement of the name or title.

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?

For a two-param download-URL tool with no output schema, the description covers the missing pieces an agent would otherwise guess at: what comes back, that content is not inlined, that the URL is temporally bounded, and how to actually retrieve bytes. Nothing needed to invoke it correctly is absent.

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 baseline would be 3; the description earns an extra point by tying the two ids to each other (blobId is the attachment's blobId within the message named by emailId) and to the discovery tools that produce them. It adds almost no syntax or format detail beyond the schema, hence not a 5.

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 and resource ("Get a short-lived download URL for one email attachment") and pins the addressing scheme to emailId + blobId. It also explicitly distinguishes itself from the sibling download_email (whole message as .eml), so an agent can route 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains where the required ids come from ("as listed by search_emails, get_thread, or get_email"), states the mechanism for using the result (save to disk out-of-band, `curl -sS -o`), and names the alternative tool plus the condition that selects it ("For the whole message as an .eml file use download_email instead"). The "do not fetch the URL into the conversation" exclusion is an explicit when-not.

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