Skip to main content
Glama

Get email attachment

get_email_attachment
Read-only

Provide email_data_id + attachment_id (from search_emails results). Dict with filename, mimeType, size, and url (CloudFront URL for the file)

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_email_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
on_behalf_ofNoA teammate's email, or an agency client's from list_agency_clients, to run this call in that account: their agents, settings, connected accounts, and credits. Omit it to act on your own account.
attachment_idNoThe attachmentId from the attachments metadata
email_data_idNoID of the email_data record (from search_emails)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / on_behalf_of / description
      Previous value: -"An agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account."New value: +"A teammate's email, or an agency client's from list_agency_clients, to run this call in that account: their agents, settings, connected accounts, and credits. Omit it to act on your own account."
  2. Changed1 schema field changed
    • addedInput schema / properties / on_behalf_of
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "An agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account."
      +}
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the readOnlyHint the description discloses the actual mechanics: the file is uploaded to S3 and a CloudFront URL is produced, plus the exact returned fields (filename, mimeType, size, url) since no output schema exists. The S3 upload is a write side effect that sits in some tension with readOnlyHint, but the description is the honest party here and discloses it rather than hiding it, so this is a nuance rather than a contradiction.

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 summary is three tight sentences with the operation, the trigger, and the required inputs in that order; the separate returns block keeps the return shape from bloating the prose. Only the title-restating opening clause is mildly redundant.

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 no output schema, the returns block is the right compensation and it is present, and the parameter provenance is covered. For a three-parameter retrieval tool the remaining gaps (URL lifetime, size limits, behavior for oversized or missing attachments) are minor, though an agent operating long after the call would benefit from knowing the URL expires.

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%, and the schema already states that email_data_id comes from search_emails and attachment_id from attachments metadata, so this dimension is largely pre-solved. The description's "Provide email_data_id + attachment_id" plus the search_emails pointer is a small workflow reinforcement, not new meaning.

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?

"Fetch an email attachment and upload it to S3, returning a URL" gives a concrete verb, resource, and even the side effect, which is more than most sibling descriptions manage. It does not, however, differentiate itself from the near-duplicate siblings read_email_attachment and read_attachment, so an agent still has to guess which one to pick.

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

Usage Guidelines4/5

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

"Use this when you need to access a file attached to an email" states the trigger condition, and the description tells the agent to obtain IDs from search_emails results, which is a real workflow hint. There is no when-not guidance and no mention of the alternative attachment-reading tools that would need to be ruled out.

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