Skip to main content
Glama
plutzilla

Omnisend MCP Server

sendEvent

Track customer behavior by sending events to Omnisend to trigger marketing automations and analyze interactions.

Instructions

Send a customer event to Omnisend. Events are used to track customer behavior and can trigger automations. Can be custom events or predefined system events.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'sendEvent'. Calls the core sendEvent API function with provided args.eventData, filters the Event response using filterEventFields, formats as pretty JSON text content, and handles errors by returning error messages.
    async (args) => {
      try {
        const response = await sendEvent(args.eventData);
        
        // Filter event data to include only defined fields
        const filteredEvent = filterEventFields(response);
        
        return {
          content: [
            { 
              type: "text", 
              text: JSON.stringify(filteredEvent, null, 2) 
            }
          ]
        };
      } catch (error) {
        if (error instanceof Error) {
          return { content: [{ type: "text", text: `Error: ${error.message}` }] };
        }
        return { content: [{ type: "text", text: "An unknown error occurred" }] };
      }
    }
  • JSON Schema for sendEvent tool input. Defines structure of eventData object, requiring eventName and contact (with optional subfields), allowing optional eventTime, eventVersion, and arbitrary properties.
    {
      additionalProperties: false,
      properties: {
        eventData: {
          additionalProperties: false,
          description: "Event data",
          properties: {
            eventName: { description: "Event name", type: "string" },
            eventTime: { description: "Event time in RFC3339 format", type: "string" },
            eventVersion: { description: "Event version", type: "string" },
            contact: {
              additionalProperties: true,
              description: "Contact information",
              properties: {
                contactID: { type: "string" },
                email: { type: "string" },
                firstName: { type: "string" },
                lastName: { type: "string" },
                phone: { type: "string" }
              },
              type: "object"
            },
            properties: {
              additionalProperties: true,
              description: "Additional event properties",
              properties: {},
              type: "object"
            }
          },
          required: ["eventName", "contact"],
          type: "object"
        }
      },
      required: ["eventData"],
      type: "object"
  • Registration of the sendEvent tool using server.tool(name, description, schema, handler). Part of the registerEventsTools function called by the main server initialization.
    server.tool(
      "sendEvent",
      "Send a customer event to Omnisend. Events are used to track customer behavior and can trigger automations. Can be custom events or predefined system events.",
      {
        additionalProperties: false,
        properties: {
          eventData: {
            additionalProperties: false,
            description: "Event data",
            properties: {
              eventName: { description: "Event name", type: "string" },
              eventTime: { description: "Event time in RFC3339 format", type: "string" },
              eventVersion: { description: "Event version", type: "string" },
              contact: {
                additionalProperties: true,
                description: "Contact information",
                properties: {
                  contactID: { type: "string" },
                  email: { type: "string" },
                  firstName: { type: "string" },
                  lastName: { type: "string" },
                  phone: { type: "string" }
                },
                type: "object"
              },
              properties: {
                additionalProperties: true,
                description: "Additional event properties",
                properties: {},
                type: "object"
              }
            },
            required: ["eventName", "contact"],
            type: "object"
          }
        },
        required: ["eventData"],
        type: "object"
      },
      async (args) => {
        try {
          const response = await sendEvent(args.eventData);
          
          // Filter event data to include only defined fields
          const filteredEvent = filterEventFields(response);
          
          return {
            content: [
              { 
                type: "text", 
                text: JSON.stringify(filteredEvent, null, 2) 
              }
            ]
          };
        } catch (error) {
          if (error instanceof Error) {
            return { content: [{ type: "text", text: `Error: ${error.message}` }] };
          }
          return { content: [{ type: "text", text: "An unknown error occurred" }] };
        }
      }
    );
  • Core helper function sendEvent that performs HTTP POST to Omnisend API /events endpoint with Partial<Event> data, returns full Event response or throws detailed error.
    export const sendEvent = async (eventData: Partial<Event>): Promise<Event> => {
      try {
        const response = await omnisendApi.post<Event>('/events', eventData);
        return response.data;
      } catch (error) {
        if (error instanceof Error) {
          throw new Error(`Error sending event: ${error.message}`);
        } else {
          throw new Error('Unknown error occurred when sending event');
        }
      }
    }; 
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions that events 'can trigger automations', which adds some behavioral context. However, it lacks details on permissions, rate limits, error handling, or what constitutes a 'customer event'. For a mutation tool with zero annotation coverage, this is insufficient.

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: it starts with the core action ('Send a customer event'), then explains purpose and types. Every sentence earns its place by adding context without redundancy. It's efficient with zero waste.

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 has no parameters, no output schema, and no annotations, the description is minimally adequate. It explains what the tool does and the event types, but as a mutation tool, it should provide more behavioral context (e.g., side effects, success indicators). The lack of output schema means the description doesn't explain return values, which is a gap.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameters need documentation. The description adds value by explaining the semantics: events can be 'custom events or predefined system events', which clarifies what can be sent. This compensates for the lack of parameter details in the schema.

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's purpose: 'Send a customer event to Omnisend' with the specific verb 'send' and resource 'customer event'. It distinguishes this from sibling tools by focusing on event tracking rather than CRUD operations on categories, contacts, or products. However, it doesn't explicitly differentiate from potential sibling event tools (though none exist in the provided list).

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 provides implied usage context: 'Events are used to track customer behavior and can trigger automations.' This suggests when to use it—for tracking behavior or triggering automations—but doesn't explicitly state when not to use it or name alternatives. No guidance is given on prerequisites or comparisons with 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/plutzilla/omnisend-mcp'

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