Skip to main content
Glama

Get an email

get_email
Read-onlyIdempotent

Read a complete workspace email by ID.

    Returns ``body_text``, ``body_html`` and other email fields.
    Inbound records include reply headers and spam, virus, SPF, DKIM and DMARC verdicts.
    Attachments include IDs and file metadata.
    An unknown or inaccessible email returns an error.

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>"
    },
    "name": "get_email"
  }
}

Input Schema

NameRequiredDescriptionDefault
email_idYesEmail ID, from ``send_email`` or ``list_emails``.
llm_modelNoThe calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics.

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. Changed4 schema fields changed
    • addedOutput schema / $defs
      Added value: +{
      +  "EmailAttachmentResponse": {
      +    "description": "One inbound MIME attachment as exposed to API consumers.\n\n``url`` is the stable Hail API endpoint that 302-redirects to a\npresigned S3 URL on access — see GET /emails/{id}/attachments/{aid}.",
      +    "properties": {
      +      "content_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "MIME Content-ID, present when this attachment is referenced inline (cid:) from the HTML body. Null otherwise.",
      +        "title": "Content Id"
      +      },
      +      "content_type": {
      +        "description": "MIME type of the attachment.",
      +        "title": "Content Type",
      +        "type": "string"
      +      },
      +      "filename": {
      +        "description": "Original filename of the attachment.",
      +        "title": "Filename",
      +        "type": "string"
      +      },
      +      "id": {
      +        "description": "Unique identifier for this attachment.",
      +        "format": "uuid",
      +        "title": "Id",
      +        "type": "string"
      +      },
      +      "size_bytes": {
      +        "description": "Size of the attachment in bytes.",
      +        "title": "Size Bytes",
      +        "type": "integer"
      +      },
      +      "url": {
      +        "description": "API endpoint that 302-redirects to a presigned download URL for this attachment.",
      +        "title": "Url",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "filename",
      +      "content_type",
      +      "size_bytes",
      +      "content_id",
      +      "url"
      +    ],
      +    "title": "EmailAttachmentResponse",
      +    "type": "object"
      +  }
      +}
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "agent_id": {
      +        "anyOf": [
      +          {
      +            "format": "uuid",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The agent this email belongs to: the address's agent on inbound rows, the writer on outbound rows.",
      +        "title": "Agent Id"
      +      },
      +      "agent_reply_state": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Inbound rows routed to an agent: 'pending', 'processing', 'done', 'skipped', or 'failed'. A skipped row names why in metadata.agent_skip_reason.",
      +        "title": "Agent Reply State"
      +      },
      +      "attachments": {
      +        "default": [],
      +        "description": "Inbound MIME attachments on this email. Empty on outbound rows.",
      +        "items": {
      +          "$ref": "#/$defs/EmailAttachmentResponse"
      +        },
      +        "title": "Attachments",
      +        "type": "array"
      +      },
      +      "bcc_addresses": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "BCC recipient email addresses, if any.",
      +        "title": "Bcc Addresses"
      +      },
      +      "body_html": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "HTML body, if any.",
      +        "title": "Body Html"
      +      },
      +      "body_text": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Plain-text body, if any.",
      +        "title": "Body Text"
      +      },
      +      "cc_addresses": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "CC recipient email addresses, if any.",
      +        "title": "Cc Addresses"
      +      },
      +      "direction": {
      +        "default": "outbound",
      +        "description": "'outbound' for emails Hail sent, 'inbound' for emails received.",
      +        "enum": [
      +          "outbound",
      +          "inbound"
      +        ],
      +        "title": "Direction",
      +        "type": "string"
      +      },
      +      "dkim_verdict": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Provider DKIM-authentication verdict (e.g. 'PASS'/'FAIL'). Inbound emails only; null on outbound rows.",
      +        "title": "Dkim Verdict"
      +      },
      +      "dmarc_verdict": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Provider DMARC-authentication verdict (e.g. 'PASS'/'FAIL'). Inbound emails only; null on outbound rows.",
      +        "title": "Dmarc Verdict"
      +      },
      +      "email_domain_id": {
      +        "anyOf": [
      +          {
      +            "format": "uuid",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The sending domain used, if from_address belongs to one of the org's configured domains.",
      +        "title": "Email Domain Id"
      +      },
      +      "end_reason": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Reason delivery failed or bounced, if applicable. Null on success or while pending.",
      +        "title": "End Reason"
      +      },
      +      "failed_at": {
      +        "anyOf": [
      +          {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "When the send failed, ISO 8601 timestamp. Null unless it failed.",
      +        "title": "Failed At"
      +      },
      +      "from_address": {
      +        "description": "Sender email address.",
      +        "title": "From Address",
      +        "type": "string"
      +      },
      +      "from_name": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Display name used on the From: header, when the sender supplied one. Always null on inbound rows.",
      +        "title": "From Name"
      +      },
      +      "id": {
      +        "description": "Unique identifier for this email.",
      +        "format": "uuid",
      +        "title": "Id",
      +        "type": "string"
      +      },
      +      "in_reply_to": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "RFC 5322 In-Reply-To header. Set on inbound emails and agent replies; null on other outbound rows.",
      +        "title": "In Reply To"
      +      },
      +      "last_event_at": {
      +        "anyOf": [
      +          {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "When the most recent delivery event for this email occurred, ISO 8601 timestamp.",
      +        "title": "Last Event At"
      +      },
      +      "message_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "RFC 5322 Message-ID header. Inbound emails only; null on outbound rows.",
      +        "title": "Message Id"
      +      },
      +      "metadata": {
      +        "additionalProperties": true,
      +        "description": "Free-form JSON object attached to the email, as sent on create. Not interpreted by Hail.",
      +        "title": "Metadata",
      +        "type": "object"
      +      },
      +      "organization_id": {
      +        "description": "Organization that sent or received this email.",
      +        "format": "uuid",
      +        "title": "Organization Id",
      +        "type": "string"
      +      },
      +      "provider_message_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The email provider's identifier for this message, if assigned.",
      +        "title": "Provider Message Id"
      +      },
      +      "provider_received_at": {
      +        "anyOf": [
      +          {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "When the provider received this email, ISO 8601 timestamp. Inbound emails only.",
      +        "title": "Provider Received At"
      +      },
      +      "raw_url": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "API endpoint that redirects to the original MIME blob. Inbound emails only; null on outbound rows.",
      +        "title": "Raw Url"
      +      },
      +      "references_ids": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "RFC 5322 References header, split into ids. Set on inbound emails and agent replies; null on other outbound rows.",
      +        "title": "References Ids"
      +      },
      +      "reply_to": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Reply-To email address, if set.",
      +        "title": "Reply To"
      +      },
      +      "requested_at": {
      +        "description": "When the send was requested, ISO 8601 timestamp.",
      +        "format": "date-time",
      +        "title": "Requested At",
      +        "type": "string"
      +      },
      +      "sent_at": {
      +        "anyOf": [
      +          {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "When the message was handed to the provider, ISO 8601 timestamp. Null until sent.",
      +        "title": "Sent At"
      +      },
      +      "spam_verdict": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Provider spam-scan verdict (e.g. 'PASS'/'FAIL'). Inbound emails only; null on outbound rows.",
      +        "title": "Spam Verdict"
      +      },
      +      "spf_verdict": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Provider SPF-authentication verdict (e.g. 'PASS'/'FAIL'). Inbound emails only; null on outbound rows.",
      +        "title": "Spf Verdict"
      +      },
      +      "status": {
      +        "description": "Delivery status: 'queued', 'sent', 'delivered', 'failed', 'bounced', 'complained', or 'received' (inbound emails).",
      +        "enum": [
      +          "queued",
      +          "sent",
      +          "delivered",
      +          "failed",
      +          "bounced",
      +          "complained",
      +          "received"
      +        ],
      +        "title": "Status",
      +        "type": "string"
      +      },
      +      "subject": {
      +        "description": "Email subject line.",
      +        "title": "Subject",
      +        "type": "string"
      +      },
      +      "to_addresses": {
      +        "description": "Recipient email addresses.",
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "To Addresses",
      +        "type": "array"
      +      },
      +      "virus_verdict": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Provider virus-scan verdict (e.g. 'PASS'/'FAIL'). Inbound emails only; null on outbound rows.",
      +        "title": "Virus Verdict"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "organization_id",
      +      "email_domain_id",
      +      "direction",
      +      "from_address",
      +      "from_name",
      +      "to_addresses",
      +      "cc_addresses",
      +      "bcc_addresses",
      +      "reply_to",
      +      "subject",
      +      "status",
      +      "end_reason",
      +      "provider_message_id",
      +      "requested_at",
      +      "sent_at",
      +      "failed_at",
      +      "metadata",
      +      "body_text",
      +      "body_html",
      +      "message_id",
      +      "in_reply_to",
      +      "references_ids",
      +      "agent_id",
      +      "agent_reply_state",
      +      "spam_verdict",
      +      "virus_verdict",
      +      "dkim_verdict",
      +      "spf_verdict",
      +      "dmarc_verdict",
      +      "provider_received_at",
      +      "raw_url",
      +      "attachments",
      +      "last_event_at"
      +    ],
      +    "title": "EmailResponse",
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "error": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / title
      Removed value: -"get_email_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 non-open-world, so the safety profile is covered. The description adds real behavioral context beyond that: which fields come back (body_text, body_html), that inbound records carry reply headers and spam/virus/SPF/DKIM/DMARC verdicts, that attachments surface as IDs plus metadata, and that failures manifest as an error rather than an empty result.

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?

Front-loaded with the core action in the first line, then four short lines each adding one distinct piece of information (bodies, verdicts, attachments, error behavior). No filler and no repetition of the annotations.

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?

An output schema exists, so return values did not need spelling out, yet the description still summarizes the payload shape helpfully. Combined with complete schema coverage and annotations, an agent has everything needed to call it correctly; only explicit sibling routing 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 coverage is 100%, so both parameters are documented, including that email_id comes from send_email or list_emails. The description adds no additional meaning about the ID format or about the llm_model analytics parameter, so this sits at the baseline where the schema does the work.

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?

States a specific verb and resource ('Read a complete workspace email by ID'), which distinguishes it from list_emails and from the narrower siblings get_email_raw and get_email_attachment. It does not explicitly name which sibling to use for raw source or attachment content, so differentiation is implicit rather than spelled out.

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 phrasing implies the tool is for fetching one full email by ID, and the error clause tells the agent what happens with an unknown or inaccessible ID. However, there is no explicit guidance on when to prefer get_email_raw or get_email_attachment over this tool, so the agent must infer the split from sibling names.

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.