Skip to main content
Glama
cseguinlz

DoubleTick MCP Server

send_tracked_email

Send emails with read tracking via Gmail to monitor when recipients open messages, including open counts and device information.

Instructions

Send an email with read tracking via Gmail. Body accepts markdown (converted to HTML automatically). The email is sent immediately via Gmail API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesRecipient email address
subjectYesEmail subject
bodyYesEmail body in markdown or HTML
ccNoCC recipients (comma-separated)
bccNoBCC recipients (comma-separated)
htmlNoTreat body as raw HTML (skip markdown conversion)

Implementation Reference

  • The tool "send_tracked_email" is defined and implemented directly within mcp-server.js using server.tool(). It validates inputs using zod, performs markdown-to-HTML conversion, injects a tracking pixel, registers the tracking ID, and sends the email via the imported sendEmail helper.
    server.tool(
      'send_tracked_email',
      'Send an email with read tracking via Gmail. Body accepts markdown (converted to HTML automatically). The email is sent immediately via Gmail API.',
      {
        to: z.string().describe('Recipient email address'),
        subject: z.string().describe('Email subject'),
        body: z.string().describe('Email body in markdown or HTML'),
        cc: z.string().optional().describe('CC recipients (comma-separated)'),
        bcc: z.string().optional().describe('BCC recipients (comma-separated)'),
        html: z.boolean().default(false).describe('Treat body as raw HTML (skip markdown conversion)'),
      },
      async ({ to, subject, body, cc, bcc, html }) => {
        if (!isAuthenticated()) {
          return { content: [{ type: 'text', text: 'Not authenticated. Run `doubletick login` in the terminal first.' }] };
        }
    
        // Convert body
        let htmlBody;
        if (html) {
          htmlBody = body;
        } else {
          htmlBody = await marked(body);
          if (!htmlBody.includes('<html')) {
            htmlBody = `<!DOCTYPE html><html><body>${htmlBody}</body></html>`;
          }
        }
    
        // Inject pixel
        const trackingId = generateTrackingId();
        htmlBody = injectPixel(htmlBody, trackingId);
    
        // Register track
        await registerTrack({ trackingId, recipientEmail: to, emailSubject: subject });
    
        // Send via Gmail API
        const result = await sendEmail({ to, subject, htmlBody, cc, bcc });
        return {
          content: [{
            type: 'text',
            text: `Email sent and tracking.\n\nTo: ${to}\nSubject: ${subject}\nTracking ID: ${trackingId}\n\nCheck status with check_tracking_status tool.`,
          }],
        };
      }
    );
Behavior3/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 adds useful context such as 'read tracking', 'body accepts markdown (converted to HTML automatically)', and 'sent immediately via Gmail API', which go beyond basic functionality. However, it does not cover aspects like error handling, rate limits, or authentication requirements, leaving some behavioral traits unspecified.

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 appropriately sized and front-loaded, with two sentences that efficiently convey key information: the tool's purpose and its main features (tracking, markdown conversion, immediate sending). Every sentence adds value without redundancy, making it concise and well-structured.

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?

Given the tool's complexity (a mutation tool with no annotations and no output schema), the description is fairly complete. It covers the core functionality, key features, and behavioral aspects like tracking and sending method. However, it lacks details on error handling, return values, or prerequisites, which could be important for a mutation tool. The absence of an output schema means the description should ideally explain what is returned, but it does not, leaving a minor gap.

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%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema by mentioning markdown conversion for the body and the immediate sending via Gmail API, but does not provide additional semantics for parameters like 'to', 'subject', or 'cc/bcc'. Baseline 3 is appropriate as the schema does the heavy lifting.

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 the tool's purpose with specific verbs ('send an email') and resources ('via Gmail'), and distinguishes it from sibling tools by specifying 'with read tracking' (unlike check_tracking_status or list_tracked_emails). It explicitly mentions the action and the unique feature of tracking.

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 description implies usage context by stating 'send an email with read tracking' and 'sent immediately via Gmail API', but does not explicitly state when to use this tool versus alternatives like check_tracking_status or list_tracked_emails. It provides some guidance on the tool's function but lacks explicit comparisons or exclusions.

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/cseguinlz/double-tick-mcp-server'

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