Skip to main content
Glama
cseguinlz

DoubleTick MCP Server

check_tracking_status

Monitor email engagement by checking if tracked emails have been opened, providing open counts, device details, and timestamps for analysis.

Instructions

Check if a tracked email has been opened. Returns open count, device info, and timestamps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trackingIdYesTracking ID returned from send_tracked_email

Implementation Reference

  • Actual implementation of the tracking status check logic.
    export async function checkStatus(trackingId) {
      const apiKey = getApiKey();
      const email = getUserEmail();
    
      const res = await fetch(`${API_BASE}/status?id=${encodeURIComponent(trackingId)}&email=${encodeURIComponent(email)}`, {
        headers: { 'X-API-Key': apiKey },
      });
    
      if (!res.ok) {
        const body = await res.text();
        if (res.status === 404) {
          throw new Error(`Tracking ID not found: ${trackingId}`);
        }
        throw new Error(`Failed to check status (${res.status}): ${body}`);
      }
    
      return res.json();
    }
  • mcp-server.js:63-91 (registration)
    Tool registration and handler wrapper for check_tracking_status.
    server.tool(
      'check_tracking_status',
      'Check if a tracked email has been opened. Returns open count, device info, and timestamps.',
      {
        trackingId: z.string().describe('Tracking ID returned from send_tracked_email'),
      },
      async ({ trackingId }) => {
        if (!isAuthenticated()) {
          return { content: [{ type: 'text', text: 'Not authenticated. Run `doubletick login` in the terminal first.' }] };
        }
    
        const data = await checkStatus(trackingId);
    
        let text = `Tracking: ${data.trackingId}\n`;
        text += `Subject: ${data.emailSubject || '(no subject)'}\n`;
        text += `To: ${data.recipientEmail || '(unknown)'}\n`;
        text += `Status: ${data.statusMessage}\n`;
        text += `Open count: ${data.openCount}\n`;
    
        if (data.opens?.length > 0) {
          text += '\nOpens:\n';
          for (const open of data.opens) {
            text += `  - ${open.formattedTimestamp || open.timeAgo} · ${open.device || 'Unknown'}\n`;
          }
        }
    
        return { content: [{ type: 'text', text }] };
      }
    );

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