Skip to main content
Glama

Mailrith Email Marketing

Create or upsert a subscriber

subscribers_upsert
Destructive

Creates a new subscriber when the email does not exist in the workspace. New subscribers are Active unless you send another status. If the email already exists, the API updates the existing subscriber unless create_only is true. Making an existing Unsubscribed, Complained, Bounced, or Blocked subscriber Active again needs reactivate: true. Effect: external-email. Retry with the same idempotency_key. Permissions: live_actions:write, subscribers:write. API reference: https://mailrith.com/developers/api-reference.

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": {
      "body": "<body>"
    },
    "name": "subscribers_upsert"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesThe exact JSON request body defined by the Mailrith public API contract.
idempotency_keyNoOptional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.

Output Schema

NameRequiredDescriptionDefault
errorNo
responseNo
request_idYesThe stable correlation ID for this MCP tool invocation.
operation_idYesThe stable Mailrith public API operation ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / $defs / ConsentEvidence / description
      Previous value: -"Compact evidence required when the public API makes a Subscriber Active. Keep raw consent text, IP addresses, and user-agent data in your evidence system; Mailrith stores only this version, reference, URL, and optional SHA-256 digest."New value: +"Optional compact consent evidence. Send it when you have it; Mailrith stores it when the request makes the Subscriber Active. Keep raw consent text, IP addresses, and user-agent data in your evidence system; Mailrith stores only this version, reference, URL, and optional SHA-256 digest."
    • addedInput schema / $defs / SubscriberUpsertRequest / properties / reactivate
      Added value: +{
      +  "description": "Send true to make an Unsubscribed, Complained, Bounced, or Blocked Subscriber Active again, and only when they knowingly asked to receive your emails again. Without it, that change returns a 409 conflict. A Subscriber who objected to or restricted processing through a privacy request can only be made Active after that request's privacy block is lifted in the app.",
      +  "type": "boolean"
      +}
  2. Changed5 schema fields changed
    • addedInput schema / $defs / ConsentEvidence / properties / collected_at / description
      Added value: +"When the consent evidence was collected, as ISO 8601 with an explicit UTC offset. This must not be later than Mailrith's server time. Do not treat a workspace-local clock as UTC; use the evidence record's confirmed timestamp."
    • removedInput schema / $defs / ConsentEvidence / properties / collected_at / format
      Removed value: -"date-time"
    • addedInput schema / $defs / ConsentEvidence / properties / collected_at / pattern
      Added value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$"
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Optional idempotency key to retry the request safely."New value: +"Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes."
    • addedInput schema / properties / idempotency_key / maxLength
      Added value: +256
  3. Changed5 schema fields changed
    • removedInput schema / $defs / ConsentEvidence / properties / collected_at / description
      Removed value: -"When the consent evidence was collected, as ISO 8601 with an explicit UTC offset. This must not be later than Mailrith's server time. Do not treat a workspace-local clock as UTC; use the evidence record's confirmed timestamp."
    • addedInput schema / $defs / ConsentEvidence / properties / collected_at / format
      Added value: +"date-time"
    • removedInput schema / $defs / ConsentEvidence / properties / collected_at / pattern
      Removed value: -"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$"
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes."New value: +"Optional idempotency key to retry the request safely."
    • removedInput schema / properties / idempotency_key / maxLength
      Removed value: -256
  4. Changed2 schema fields changed
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Optional idempotency key to retry the request safely."New value: +"Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes."
    • addedInput schema / properties / idempotency_key / maxLength
      Added value: +256
  5. Changed3 schema fields changed
    • addedInput schema / $defs / ConsentEvidence / properties / collected_at / description
      Added value: +"When the consent evidence was collected, as ISO 8601 with an explicit UTC offset. This must not be later than Mailrith's server time. Do not treat a workspace-local clock as UTC; use the evidence record's confirmed timestamp."
    • removedInput schema / $defs / ConsentEvidence / properties / collected_at / format
      Removed value: -"date-time"
    • addedInput schema / $defs / ConsentEvidence / properties / collected_at / pattern
      Added value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$"
  6. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and openWorldHint=true, so the bar is lower. The description still adds real value with permission scopes (live_actions:write, subscribers:write), the external-email side effect, status defaults, and the idempotency_key retry mechanism. The retry-with-same-key wording sits slightly at odds with idempotentHint=false, but they describe different things (natural idempotency vs. key-based deduplication) rather than contradicting each other.

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?

Dense but front-loaded: creation behavior first, then update/reactivate edge cases, then effect, retry, and permissions. Each sentence carries a distinct constraint, though the closing API-reference URL is boilerplate rather than actionable guidance for the agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers everything an agent needs for a destructive, nested-body upsert: creation vs. update branching, default status, 409-triggering flags, reactivation caveats, idempotent retry, and required permissions. Return values are not needed because an output schema exists.

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?

Schema description coverage is 100%, so the baseline is 3, and the description goes beyond it by stating that new subscribers default to Active unless a status is supplied, plus the 409 consequences of create_only and reactivate. The consent_evidence and custom_fields semantics are left entirely to the schema, which is acceptable given its richness.

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 concrete verb+resource (create-or-upsert a subscriber) and immediately defines the branching logic: create when the email is absent, update when it exists unless create_only is true. This makes it distinguishable from the sibling subscribers_update and subscribers_update_status tools without opening a schema.

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 conditions, including the non-obvious case that reviving an Unsubscribed/Complained/Bounced/Blocked subscriber requires reactivate: true and otherwise returns 409. It does not explicitly point to alternatives (e.g., subscribers_update or subscribers_add_tag) when an agent only wants to modify an existing record, but the create-vs-update decision is fully specified.

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.