Skip to main content
Glama

download_attachment

Read-only

Retrieve email attachment metadata and a fetchable resource link. Set inline to embed the bytes.

Instructions

Get attachment metadata and a fetchable resource link. Set inline to embed the bytes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inlineNo
accountIdYes
messageIdYes
attachmentIdYesOpaque attachment ID returned by message metadata

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.1
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  2. Changed7 schema fields changedv0.11.0
    • removedInput schema / properties / accountId / description
      Removed value: -"Account to operate on. Optional when exactly one account is connected."
    • addedInput schema / properties / inline
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / messageId / $ref
      Added value: +"#/properties/accountId"
    • removedInput schema / properties / messageId / minLength
      Removed value: -1
    • removedInput schema / properties / messageId / type
      Removed value: -"string"
    • changedInput schema / required
      Previous value: -[
      -  "messageId",
      -  "attachmentId"
      -]New value: +[
      +  "accountId",
      +  "messageId",
      +  "attachmentId"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "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"
      +}
  3. Changed4 schema fields changedv0.9.0
    • removedInput schema / properties / attachmentId / $ref
      Removed value: -"#/properties/messageId"
    • addedInput schema / properties / attachmentId / description
      Added value: +"Opaque attachment ID returned by message metadata"
    • addedInput schema / properties / attachmentId / minLength
      Added value: +1
    • addedInput schema / properties / attachmentId / type
      Added value: +"string"
  4. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds genuinely useful behavior beyond that: it discloses that the tool returns metadata and a fetchable link rather than bytes, and that 'inline' embeds the bytes. It does not cover rate limits or link expiry, so it stays at a moderate level.

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?

Two short sentences, front-loaded with the operation and immediately followed by the only non-obvious parameter instruction. No filler. Terse to the point of under-specifying scope, but structurally efficient.

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?

An output schema exists, so return values need not be described, and that is correctly left out. However, for a 4-parameter tool with only 25% schema coverage, the description should establish the account/message/attachment resolution chain and clarify that no bytes are downloaded unless inline is set. It hints at the latter but omits the former.

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

Parameters3/5

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

Schema coverage is only 25%, so the description must compensate. It explains the undocumented 'inline' flag ('Set inline to embed the bytes'), which is the parameter most likely to confuse an agent, but accountId and messageId remain unexplained. Partial compensation lands at the baseline of 3.

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 states a specific verb+resource pair ('Get attachment metadata and a fetchable resource link'), which is distinct from all siblings in the list. It is weakened slightly by the name 'download_attachment' implying byte retrieval while the description clarifies it actually returns metadata plus a link, a nuance the agent must reconcile.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives, nor any mention of the prerequisite chain (obtaining accountId/messageId/attachmentId from message metadata first). The only hint, 'returned by message metadata' in the schema, is not repeated or contextualized in the description.

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