Skip to main content
Glama
Resend Email MCP

Resend Email MCP

Update Automation

update-automation

Modify an automation's name, status, or workflow. Rename, enable, disable, or replace workflow steps to control when and how email automations run.

Instructions

Purpose: Update an automation's name, status, or workflow.

When to use:

  • User wants to rename an automation

  • User wants to enable or disable an automation (use status: "disabled" to stop it)

  • User wants to modify the workflow steps

Important:

  • To disable/stop an automation, set status to "disabled". No new runs start, and each run in progress is cancelled when it reaches its next step.

  • When updating the workflow, provide the complete new workflow — it replaces the existing one.

  • Use get-automation first to see the current workflow before making changes.

The workflow is a JSON object with one key: "steps" — an array of step objects.

Each step has: key (unique string), type, config, and either "next" (string|null) or "branches" (for branching steps). Use keys like: "trigger", "send_email_1", "delay_1", "condition_1", "wait_event_1".

Step types

trigger — starts the automation when an event fires (required, exactly one)

config: { "eventName": "<event_name>" } Uses "next".

send_email — send an email using a published template

config: { "template": { "id": "<template_id>", "variables": { "": "" } }, "from": "Name sender@example.com", "subject": "Email subject", "replyTo": "" } "from" and "subject" are resolved from the step config first, then fall back to the template. If neither provides a "from", the email will silently fail to send. If neither provides a "subject", the run will error. Best practice: always set "from" and "subject" on the step config so the automation is self-contained. Use list-domains to find verified domains for "from". "replyTo" and "variables" are optional. Variables can use { "var": "event." } or { "var": "contact." } for dynamic values. Uses "next".

delay — pause the workflow

config: { "duration": "" } Examples: "30 minutes", "1 hour", "2 days", "1 week". Max 30 days. Uses "next".

condition — conditional split based on contact or event data

config: A condition rule object: Single rule: { "type": "rule", "field": "event." or "contact.", "operator": "", "value": } Compound: { "type": "and"|"or", "rules": [, ...] } Operators: eq, neq, gt, gte, lt, lte, contains, starts_with, ends_with, exists, is_empty. exists/is_empty do not require a value. Uses "branches": { "condition_met": "<step_key>", "condition_not_met": "<step_key_or_null>" }

wait_for_event — pause until a specific event arrives or timeout

config: { "eventName": "<event_name>", "timeout": "", "filterRule": } For email lifecycle events use "resend:email.<opened|clicked|bounced|delivered|complained|failed|suppressed>". Uses "branches": { "event_received": "<step_key>", "timeout": "<step_key_or_null>" }

contact_update — update contact fields

config: { "firstName": "", "lastName": "", "unsubscribed": true|false, "properties": { "": "" } } All fields optional. Values can use { "var": "event." } for dynamic data. Uses "next".

contact_delete — remove the contact from the audience

config: {} Uses "next".

add_to_segment — add contact to a segment

config: { "segmentId": "<segment_id>" } Uses "next".

Rules

  1. Every step must be reachable from the trigger via next/branches.

  2. Terminal steps have "next": null (or null branch values).

  3. The workflow must be tree-shaped — no merging branches back together.

Example: Linear drip campaign

{ "steps": [ { "key": "trigger", "type": "trigger", "config": { "eventName": "user.created" }, "next": "send_email_1" }, { "key": "send_email_1", "type": "send_email", "config": { "template": { "id": "tmpl_123" }, "from": "Welcome hello@example.com", "subject": "Welcome!" }, "next": "delay_1" }, { "key": "delay_1", "type": "delay", "config": { "duration": "3 days" }, "next": "send_email_2" }, { "key": "send_email_2", "type": "send_email", "config": { "template": { "id": "tmpl_456" }, "from": "Welcome hello@example.com", "subject": "Getting started" }, "next": null } ] }

Example: Re-engagement with wait_for_event

{ "steps": [ { "key": "trigger", "type": "trigger", "config": { "eventName": "user.created" }, "next": "send_email_1" }, { "key": "send_email_1", "type": "send_email", "config": { "template": { "id": "tmpl_789" }, "from": "Team team@example.com", "subject": "Welcome" }, "next": "wait_event_1" }, { "key": "wait_event_1", "type": "wait_for_event", "config": { "eventName": "resend:email.opened", "timeout": "3 days" }, "branches": { "event_received": null, "timeout": "send_email_2" } }, { "key": "send_email_2", "type": "send_email", "config": { "template": { "id": "tmpl_abc" }, "from": "Team team@example.com", "subject": "Did you miss this?" }, "next": null } ] }

Example: Condition branch

{ "steps": [ { "key": "trigger", "type": "trigger", "config": { "eventName": "trial.ended" }, "next": "condition_1" }, { "key": "condition_1", "type": "condition", "config": { "type": "rule", "field": "event.converted", "operator": "eq", "value": true }, "branches": { "condition_met": "send_email_1", "condition_not_met": "send_email_2" } }, { "key": "send_email_1", "type": "send_email", "config": { "template": { "id": "tmpl_thanks" }, "from": "Team team@example.com", "subject": "Thanks for upgrading!" }, "next": null }, { "key": "send_email_2", "type": "send_email", "config": { "template": { "id": "tmpl_win_back" }, "from": "Team team@example.com", "subject": "We'd love to have you back" }, "next": null } ] }

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "update-automation"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesAutomation ID or Resend dashboard URL (e.g. https://resend.com/automations/<id>)
nameNoNew name for the automation.
statusNoNew status. Use "disabled" to stop the automation (prevents new runs).
workflowNoNew workflow definition. Replaces the existing workflow entirely.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.28.2
    • removedInput schema / properties / workflow / properties / steps / items / properties / branches / additionalProperties / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / workflow / properties / steps / items / properties / branches / additionalProperties / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / workflow / properties / steps / items / properties / next / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / workflow / properties / steps / items / properties / next / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed1 schema field changedv2.12.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. First observedv2.10.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it states that setting status to "disabled" prevents new runs AND cancels in-progress runs at their next step, and that the workflow parameter is a full replacement rather than a patch. It also discloses two silent-failure modes (missing "from" = email silently fails, missing "subject" = run errors), which is exactly the kind of non-obvious behavior an agent cannot infer from the schema.

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?

Purpose and when-to-use are front-loaded, and headings make the long body scannable, so the size is largely justified by the undocumented step-config surface. Still, the three full workflow examples plus repeated `from`/`subject` guidance push length well past what most calls require, and a reference to a separate schema doc would serve better than inline duplication.

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 nested-workflow mutation with no annotations and no output schema, the definition is unusually complete: it covers replacement semantics, validation rules, and per-step config. The remaining gap is the response — with no output schema present, the agent gets no indication of what an update returns (updated object, run status, or nothing).

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

Parameters5/5

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

Schema coverage is 100%, so the baseline is 3, but the description goes far beyond it: the schema leaves step `config` as a bare `additionalProperties: {}` object, and the description fills that hole with per-step-type config shapes, the full condition operator list, key-naming conventions, and the tree-shape reachability rules. This is essential semantics the schema deliberately omits.

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?

Opens with a precise verb+resource+scope: "Update an automation's name, status, or workflow." The three mutable facets map exactly to the optional parameters, so an agent immediately knows what the tool can and cannot change, and the name distinguishes it from create-automation/get-automation.

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

Usage Guidelines5/5

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

An explicit "When to use" block enumerates the three triggering user intents (rename, enable/disable, modify workflow steps), and it names a prerequisite sibling: "Use get-automation first to see the current workflow before making changes." That is the when-to-use plus the alternative-sequencing an agent needs.

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

Deploy Server

Other Tools