Skip to main content
Glama

userDetails

Retrieve comprehensive contact details including profile information and engagement metrics by providing an email address. Access user-specific data stored in Mailmodo for analysis and targeted campaigns.

Instructions

Tool to get all details of a contact

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYes

Implementation Reference

  • src/server.ts:62-76 (registration)
    The tool 'userDetails' is registered as an MCP server tool on line 62. It accepts an 'email' string parameter, calls getContactDetails(), and returns the result as JSON text.
    server.tool(
      "userDetails",
      "Tool to get all details of a contact ",
      {
        email: z.string(),
      },
      async ({ email }) => {
        const details = await getContactDetails(mmApiKey,email);
        return{
        content: [{
          type: "text",
          text: JSON.stringify(details)
        }]
      }}
    );
  • The getContactDetails() function is the actual handler/API call for the userDetails tool. It makes an HTTP GET request to the Mailmodo API's getContactDetails endpoint using the provided email, and returns the contact details.
    export async function getContactDetails(
        mmApiKey: string,
        email: string
    ): Promise<any | null> {
        if (!email) {
            throw new Error('Email is a required field');
        }
    
        try {
            const response = await axios.get<any>(
                `https://api.mailmodo.com/api/v1/getContactDetails?email=${encodeURIComponent(email)}`,
                {
                    headers: {
                        'Accept': 'application/json',
                        'mmApiKey': mmApiKey || ''
                    }
                }
            );
    
            return response.data;
        } catch (error) {
            if (error instanceof AxiosError) {
                return null;
            }
            throw new Error('An unexpected error occurred');
        }
    }
  • Type interfaces (MailmodoContact and MailmodoContactWithoutList) that define the contact data structure used across contact management APIs.
    export interface MailmodoContact {
        email: string;
        listName: string;
        data?: UserProperties;
        created_at?: string;  // ISO 8601 or UNIX timestamp
        last_click?: string;  // ISO 8601 or UNIX timestamp
        last_open?: string;   // ISO 8601 or UNIX timestamp
        timezone?: string;   // Region format timezone
    }
    export interface MailmodoContactWithoutList {
      email: string;
      data?: UserProperties;
      created_at?: string;  // ISO 8601 or UNIX timestamp
      last_click?: string;  // ISO 8601 or UNIX timestamp
      last_open?: string;   // ISO 8601 or UNIX timestamp
      timezone?: string;   // Region format timezone
    }
Behavior2/5

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

With no annotations, the description should disclose side-effects, permissions, error handling, or output format. It only says 'get all details', omitting critical behavioral context like what happens if email is invalid or not found.

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, concise sentence with the verb first. It is efficient but could be slightly more descriptive without losing conciseness.

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?

For a simple tool with one parameter and no output schema, the description is lacking: no mention of return format, error states, or conditions. It fails to provide sufficient context for an agent to use it reliably.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet the description adds no extra meaning to the 'email' parameter beyond its existence. No format, validation rules, or examples are provided.

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 tool retrieves all details of a contact, with the input being an email from the schema. It is distinct from sibling tools which are mainly mutation operations, but lacks specificity about what 'details' include.

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, no mention of prerequisites (e.g., email must exist), and no indication of context like read-only nature or when to prefer other tools.

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/mailmodo/mailmodo-mcp'

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