Skip to main content
Glama
getplatform

GetMailer MCP Server

by getplatform

get_email

Retrieve email details and delivery events by providing an email ID to track message status and content.

Instructions

Get details of a specific email including delivery events

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesEmail ID

Implementation Reference

  • Handler function for the 'get_email' tool that fetches specific email details from the GetMailer API using the provided ID and returns the result as formatted JSON text.
    case 'get_email': {
      const result = await apiRequest(`/api/emails/${args?.id}`);
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
      };
    }
  • Input schema definition for the 'get_email' tool, requiring a string 'id' parameter for the email ID.
    inputSchema: {
      type: 'object' as const,
      properties: {
        id: {
          type: 'string',
          description: 'Email ID',
        },
      },
      required: ['id'],
    },
  • src/index.ts:136-149 (registration)
    Registration of the 'get_email' tool in the ListTools response, including name, description, and input schema.
    {
      name: 'get_email',
      description: 'Get details of a specific email including delivery events',
      inputSchema: {
        type: 'object' as const,
        properties: {
          id: {
            type: 'string',
            description: 'Email ID',
          },
        },
        required: ['id'],
      },
    },
  • Helper function 'apiRequest' used by the get_email handler to make authenticated HTTP requests to the GetMailer API.
    async function apiRequest<T>(
      endpoint: string,
      options: RequestInit = {}
    ): Promise<T> {
      const url = `${API_URL}${endpoint}`;
    
      const response = await fetch(url, {
        ...options,
        headers: {
          'Content-Type': 'application/json',
          Authorization: `Bearer ${API_KEY}`,
          ...options.headers,
        },
      });
    
      if (!response.ok) {
        let errorMessage = response.statusText;
        try {
          const errorData = await response.json();
          errorMessage = errorData.error || errorData.message || errorMessage;
        } catch {
          // Ignore
        }
        throw new Error(`API Error: ${errorMessage}`);
      }
    
      return response.json();
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'delivery events' as part of the details, which adds some context beyond a basic read operation, but fails to address critical aspects like permissions needed, rate limits, error conditions, or whether the operation is idempotent. For a tool with zero annotation coverage, this leaves significant gaps.

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?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded with the core functionality.

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

Completeness3/5

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

Given the tool's moderate complexity (single parameter read operation), no annotations, and no output schema, the description is minimally adequate. It specifies the resource and includes 'delivery events' as extra detail, but lacks information on return values, error handling, or behavioral constraints, leaving room for improvement in completeness.

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?

The schema description coverage is 100%, with the single parameter 'id' clearly documented as 'Email ID'. The description does not add any additional meaning or context about the parameter beyond what the schema provides, such as format examples or sourcing guidance. With high schema coverage, the baseline score of 3 is appropriate.

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 clearly states the verb 'Get' and the resource 'details of a specific email including delivery events', which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_emails' or 'get_batch', which would require a 5.

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?

The description provides no guidance on when to use this tool versus alternatives like 'list_emails' or 'get_batch', nor does it mention prerequisites or exclusions. It only states what the tool does, not when to apply it.

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/getplatform/getmailer-mcp'

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