Skip to main content
Glama

Get an email attachment

get_email_attachment
Read-onlyIdempotent

Return a temporary download URL for an inbound email attachment.

    The URL expires after approximately five minutes and requires no authorization header.
    Returns ``url``, or an error for an unavailable attachment.

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": {
      "email_id": "<email_id>",
      "attachment_id": "<attachment_id>"
    },
    "name": "get_email_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
email_idYesInbound email ID, from ``list_emails`` with direction ``inbound``.
llm_modelNoThe calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics.
attachment_idYesAttachment ID, from the ``attachments`` of ``get_email``.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / llm_model / description
      Previous value: -"Model ID of the calling agent. Optional. Recorded for analytics only."New value: +"The calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics."
  2. Changed3 schema fields changed
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "url": {
      +        "description": "Short-lived download URL.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "url"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "error": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / title
      Removed value: -"get_email_attachment_toolDictOutput"
  3. Changed1 schema field changed
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "Model ID of the calling agent. Optional. Recorded for analytics only.",
      +  "type": "string"
      +}
  4. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety is covered. The description adds genuinely new behavior: the URL expires in roughly five minutes, no authorization header is needed to use it, and an unavailable attachment produces an error rather than a null URL. That expiry/auth/error disclosure is exactly the kind of context annotations cannot carry; it falls short of 5 only because error shape and any retry guidance are unspecified.

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 short sentences, each carrying distinct information (what is returned, the expiry/auth caveat, the failure case), with the core action front-loaded. Nothing is redundant with the title or schema.

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?

With an output schema present, the description need not document return structure, and it still flags the 'url or error' outcome. Annotations cover the safety profile. The only mild gap is that the practical workflow (call this, then download within five minutes without auth) could be stated as an explicit follow-up step, but nothing needed to invoke the tool is missing.

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 description coverage is 100%, with both required IDs documented and sourced (list_emails for email_id, the attachments field of get_email for attachment_id). The description adds no further meaning about parameter formats or constraints, which is acceptable given the schema already does that work — baseline 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 opens with a specific verb and resource: 'Return a temporary download URL for an inbound email attachment.' An agent immediately knows this is a retrieval of a download link, not the attachment content itself, and the 'inbound' scoping separates it from the send/upload siblings. It stops short of naming a concrete alternative (e.g. get_email_raw), so it lands at 4 rather than 5.

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?

Usage is only implied: the tool is for attachments on inbound emails, and the schema notes where email_id and attachment_id come from. There is no explicit statement of when to pick this over get_email_raw or get_email, nor any stated preconditions beyond the parameter provenance.

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.