Skip to main content
Glama

Get raw email

get_email_raw
Read-onlyIdempotent

Return a temporary download URL for an inbound email's original MIME source.

    The URL expires after approximately five minutes and requires no authorization header.
    Raw source is available only for inbound emails.
    Returns ``url``, or an error for an unavailable email.

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_raw"
  }
}

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.

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_raw_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

A4/5.0
Behavior4/5

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

Adds concrete behavior beyond the annotations: the URL expires after roughly five minutes, requires no authorization header, only works for inbound mail, and returns an error when the email is unavailable. These are real operational facts an agent needs. It does not say whether the URL can be re-fetched by calling again or whether the download is size-limited.

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?

Three short sentences, front-loaded with the action and return type, then constraints. No filler, though 'returns url, or an error' partly duplicates the output 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?

For a two-parameter read tool with full annotation coverage and an output schema, the description supplies the key missing operational details: TTL, no-auth download, inbound-only restriction, error case. Only minor gaps remain, such as re-fetchability of expired URLs.

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 100%, so baseline would be 3; the description earns a point by explaining that the deliverable is a URL for the inbound MIME source rather than message content, which clarifies what email_id selects. The analytics-only llm_model parameter is left unmentioned in the description, though the schema documents it.

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+resource+output: 'Return a temporary download URL for an inbound email's original MIME source.' An agent can immediately tell this is a raw-MIME retrieval rather than a parsed-message fetch like get_email. It stops short of naming the sibling to use instead for parsed content.

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?

Gives a clear when-not: 'Raw source is available only for inbound emails', reinforced by the schema note that email_id comes from list_emails with direction inbound. No alternative tool is named for retrieving parsed bodies, so an agent must infer that from sibling listings.

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.