Skip to main content
Glama

read_email

Get the full content of an email, including body, headers, and attachments, by providing the email ID.

Instructions

Read the full content of a specific email including body, headers, and attachments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
email_idYesThe email ID to read

Implementation Reference

  • The handler function for the read_email tool. Takes an email_id parameter, fetches the email from the Blip API at /v1/emails/{email_id}, and returns the full email content including body, headers, and attachments.
      async ({ email_id }) => {
        const result = await blipFetch(`/v1/emails/${email_id}`);
        return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
      }
    );
  • Input schema for the read_email tool, defined with Zod. Requires a single string parameter 'email_id'.
    {
      email_id: z.string().describe("The email ID to read"),
    },
  • Registration of the 'read_email' tool on the MCP server via server.tool(). The tool is named 'read_email', has a description, a Zod schema for input, and a handler callback.
    server.tool(
      "read_email",
      "Read the full content of a specific email including body, headers, and attachments.",
      {
        email_id: z.string().describe("The email ID to read"),
      },
      async ({ email_id }) => {
        const result = await blipFetch(`/v1/emails/${email_id}`);
        return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
      }
    );
  • Helper function blipFetch that makes authenticated HTTP requests to the Blip API. Used by the read_email handler to fetch the email data.
    async function blipFetch(
      path: string,
      options: RequestInit = {}
    ): Promise<unknown> {
      const url = `${API_URL}${path}`;
      const res = await fetch(url, {
        ...options,
        headers: {
          Authorization: `Bearer ${API_KEY}`,
          "Content-Type": "application/json",
          ...options.headers,
        },
      });
    
      if (!res.ok) {
        const body = await res.text();
        throw new Error(`Blip API error ${res.status} on ${options.method || "GET"} ${path}: ${body}`);
      }
    
      if (res.status === 204) return null;
      return res.json();
    }
Behavior2/5

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

With no annotations, the description must fully disclose behavioral traits. It fails to mention that reading is non-destructive, requires authentication, or what happens on missing email IDs. The statement is too brief.

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 description is a single clear sentence, front-loaded with the action and scope. It could be slightly more structured but remains efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description should elaborate on return values (e.g., structure of body, headers, attachments) and error conditions. It does not, leaving important gaps.

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% for the single parameter, but the description adds no extra meaning beyond 'the email ID to read'. It does not explain format or origin of the ID.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool reads a specific email's full content including body, headers, and attachments. This distinguishes it from sibling tools like list_inboxes or create_inbox.

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?

No guidance on when to use this tool versus alternatives. For instance, it does not clarify how read_email differs from get_inbox or when to prefer one over the other.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/blipemail/blip'

If you have feedback or need assistance with the MCP directory API, please join our Discord server