Skip to main content
Glama

Fluxmail Cloud

Download attachment

download_attachment
Read-only

Get metadata and a resource link for one attachment. With inline, the result also includes the content. For a PDF, inline adds extracted text, and pages returns the text of a page range such as 201-400. The resource link and REST download serve attachments up to 50 MB, and inline content is limited to 10 MB. Pages without inline reads text from PDFs up to 30 MB.

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": {
      "messageId": "<messageId>",
      "attachmentId": "<attachmentId>"
    },
    "name": "download_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
pagesNoPDF page or page range to read as text, such as 201-400
inlineNo
accountIdNoAccount to operate on. Optional when exactly one account is connected.
messageIdYes
attachmentIdYesOpaque attachment ID returned by message metadata

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "filename": {
      +          "type": "string"
      +        },
      +        "id": {
      +          "type": "string"
      +        },
      +        "mimeType": {
      +          "type": "string"
      +        },
      +        "sizeBytes": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "filename",
      +        "mimeType",
      +        "sizeBytes"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "data"
      +  ],
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • changedInput schema / properties / accountId / anyOf
      Previous value: -[
      -  {
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 512,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / attachmentId / maxLength
      Added value: +512
    • addedInput schema / properties / messageId / maxLength
      Added value: +512
  3. Changed14 schema fields changed
    • changedInput schema / $schema
      Previous value: -"https://json-schema.org/draft/2020-12/schema"New value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / properties / accountId / anyOf
      Added value: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / accountId / description
      Added value: +"Account to operate on. Optional when exactly one account is connected."
    • removedInput schema / properties / accountId / maxLength
      Removed value: -512
    • removedInput schema / properties / accountId / minLength
      Removed value: -1
    • removedInput schema / properties / accountId / type
      Removed value: -"string"
    • addedInput schema / properties / attachmentId / description
      Added value: +"Opaque attachment ID returned by message metadata"
    • removedInput schema / properties / attachmentId / maxLength
      Removed value: -512
    • changedInput schema / properties / inline / type
      Previous value: -"boolean"New value: +[
      +  "boolean",
      +  "null"
      +]
    • removedInput schema / properties / messageId / maxLength
      Removed value: -512
    • addedInput schema / properties / pages / anyOf
      Added value: +[
      +  {
      +    "description": "PDF page or page range to read as text, such as 201-400",
      +    "pattern": "^[1-9]\\d{0,5}(-[1-9]\\d{0,5})?$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / pages / description
      Added value: +"PDF page or page range to read as text, such as 201-400"
    • removedInput schema / properties / pages / pattern
      Removed value: -"^[1-9]\\d{0,5}(-[1-9]\\d{0,5})?$"
    • removedInput schema / properties / pages / type
      Removed value: -"string"
  4. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  5. Changed1 schema field changed
    • addedInput schema / properties / pages
      Added value: +{
      +  "pattern": "^[1-9]\\d{0,5}(-[1-9]\\d{0,5})?$",
      +  "type": "string"
      +}
  6. Changed1 schema field changed
    • addedInput schema / properties / inline
      Added value: +{
      +  "type": "boolean"
      +}
  7. First observed

TDQS

A3.6/5.0
Behavior3/5

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

The annotations already state that this is a safe read operation (readOnlyHint=true, destructiveHint=false, openWorldHint=false), so the description's job is to add context beyond that. It does add useful limits: 50 MB for the resource link and REST download, 10 MB for inline content, and 30 MB for page text without inline. However, it says nothing about permissions, authentication, or failure behavior, so this is meaningful but incomplete added transparency.

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?

The description is five dense sentences with a front-loaded statement of what the tool returns, and it has no wasted preamble. The closing sentence ("Pages without inline reads text from PDFs up to 30 MB") is grammatically awkward and takes a moment to parse, which keeps this just short of a 5.

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?

Because an output schema exists, the description does not need to explain return values, and it covers the modes, size ceilings, and page behavior an agent must know before calling. It is nearly complete for a read tool, though it leaves open whether inline works for non-PDF attachments and what happens when limits are exceeded.

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 60%, and the description adds real meaning for the undocumented inline parameter: it makes the result include content, and it adds extracted text for PDFs. The pages parameter's behavior is also clarified, including a concrete range example. The description does not explain accountId or the ID parameters beyond what the schema says, but those are largely self-evident.

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 gives a specific verb and resource: "Get metadata and a resource link for one attachment." That is clear enough to distinguish this tool from siblings, but the description never explicitly contrasts it with adjacent tools, so the separation is inferred rather than stated.

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 explains mode behavior well: inline returns content, pages returns PDF text, and it gives size limits. It does not give explicit when-to-use or when-not-to-use guidance, such as when to use inline versus the resource link or REST download. The usage is therefore implied rather than directed.

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