Skip to main content
Glama

Create Email Trigger

meisa_create_trigger

Create a new email trigger in Meisa that maps a trigger_key to an existing email template. Use this when the user wants to wire up a transactional email like a verification code, password reset, welcome email, or refund confirmation. After creation, external products call meisa_send_email (or the /email/trigger/ API) with this trigger_key to send the email. Requires a unique trigger_key, a name, and a template_id. The template must already exist (use meisa_list_templates to find its UUID).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesHuman-readable name for the trigger (shown in the dashboard).
is_activeNoWhether the trigger is active (can accept send requests). Default true.
sender_idNoUUID of a SenderIdentity to use. Defaults to the product's default sender.
conditionsNoSend conditions evaluated against the contact at send time. If they do not pass, the send is skipped (not an error). Empty or omitted means always send. Example: [{"field": "tag", "fieldName": "vip", "operator": "exists"}].
delay_unitNoUnit for delay_value. Default 'minutes'.
delay_valueNoSend delay amount. 0 (default) sends immediately. A positive value schedules the send; the conditions are re-checked when the delay elapses, so a contact who stops matching is skipped.
descriptionNoInternal description of what this trigger does.
template_idYesUUID of the existing email template to link. Use meisa_list_templates to find it.
trigger_keyYesUnique key used in API calls (e.g. 'verification_code', 'welcome', 'refund_confirmed'). Will be slugified to lowercase_with_underscores.
email_categoryNoSubscription category, so recipients can unsubscribe from this kind of email and keep the rest: 'onboarding' (tips and onboarding), 'product_updates', 'promotions' (offers and discounts), 'newsletter'. Empty string = automatic: the template's category decides (promotional -> promotions, announcement -> product_updates, newsletter -> newsletter), otherwise sequences and triggers use 'onboarding' and broadcasts use 'product_updates'. Ignored on triggers with override_unsubscribe (those are transactional and always send).
condition_logicNoWhether ALL conditions must pass ('all', the default) or ANY one ('any').
skip_rate_limitNoSkip the per-contact 24h rate-limit guardrail. Default false.
subject_overrideNoOverride the template's subject line. Supports {{variable}} personalization.
expected_variablesNoList of variable names this trigger expects, e.g. ["pin", "reset_link"]. Used for dashboard documentation; not enforced at send time.
override_unsubscribeNoSend even to unsubscribed contacts. Use only for truly transactional emails (verification codes, password resets, refunds). Default false.
skip_duplicate_checkNoSkip the duplicate-template guardrail. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnly=false, destructive=false, idempotent=false); the description adds useful workflow context that annotations cannot: the trigger_key must be unique, the template must pre-exist, and external products later call meisa_send_email with the key. It stays consistent with the non-idempotent hint (duplicate key would fail) rather than contradicting it.

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?

Four sentences, zero waste, and front-loaded: purpose first, then when to use, then the downstream send flow, then prerequisites. Every sentence carries information an agent needs.

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?

For a 16-parameter creation tool with no output schema, the description covers the identity, required inputs, and post-creation flow. It omits mention of behaviorally significant options (conditions, delay, override_unsubscribe, skip_duplicate_check), though the schema documents those fully, so the gap is modest.

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 all 16 parameters are already documented, including the important conditions/delay/override_unsubscribe semantics. The description only restates the three required fields and the uniqueness of trigger_key, adding little beyond the schema; baseline 3 is appropriate.

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?

States a specific verb and resource ('Create a new email trigger') plus the core mapping it establishes (trigger_key -> existing template). This cleanly separates it from meisa_update_trigger, meisa_activate_trigger, and meisa_delete_trigger in the sibling list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear when-to-use context ('wire up a transactional email like a verification code, password reset, welcome email, or refund confirmation') and names meisa_list_templates as the prerequisite lookup tool. It does not state any when-not condition or contrast triggers against sequences/broadcasts, which is the only gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources