Skip to main content
Glama

Get a download link for one attachment

get_attachment
Read-onlyIdempotent

Returns a short-lived download link for one attachment, so you can save the file with your own tools (for example curl -L -o <safeFilename> <downloadUrl>, using the safeFilename field) instead of carrying it through the conversation. Files under 32 KB also come back inline as base64. The link works for about 15 minutes and reaches only this one attachment, but anyone holding it can use it in that window, so treat it as a secret and do not paste it anywhere public. Files over 50 MB, and files the mail server reports no size for, are not served: open those in the mail app. Use the partId from a message's attachments array (returned by list_messages / get_message).

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": {
      "inboxId": "<inboxId>",
      "messageId": "<messageId>",
      "partId": "<partId>"
    },
    "name": "get_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
partIdYes
inboxIdYes
messageIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, the description discloses the ~15-minute link lifetime, single-attachment scoping, secret-handling requirement, the 32 KB inline base64 threshold, and the 50 MB / unknown-size refusal. This is exactly the behavioral context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One dense paragraph, front-loaded with what is returned and followed by the safety and size caveats. Every clause is useful, though the curl example embedded mid-sentence slightly interrupts the primary explanation.

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?

There is no output schema, and the description compensates by naming the return fields (safeFilename, downloadUrl) and the conditional inline base64 payload. Combined with size limits and link lifetime, an agent has everything needed to call and use the result correctly.

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 description coverage is 0%, so the description must compensate. It fully documents the ambiguous parameter (partId comes from a message's attachments array) and implicitly explains where messageId comes from via get_message, but inboxId is never addressed and no format examples are given for any of the three.

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?

Opens with a specific verb and resource: 'Returns a short-lived download link for one attachment.' It is clear the tool issues a link rather than the file bytes, but it never distinguishes itself from the sibling tool attachment_link, which an agent could easily confuse it with.

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?

Explicit when-to-use ('save the file with your own tools ... instead of carrying it through the conversation'), explicit when-not ('Files over 50 MB, and files the mail server reports no size for, are not served: open those in the mail app'), plus the prerequisite that partId comes from a message's attachments array via list_messages/get_message.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources