Skip to main content
Glama

Email marketing: add a client with consent

email_marketing_add_contact
Destructive

ADD a client to the e-mail marketing base (the newsletter audience) WITH their consent — the same as the «Додати в розсилку» button on a client card. Needs the e-mail and HOW the person agreed to get letters: 'verbal' (said yes in the shop / on the phone), 'written' (a form, a letter, a message) or 'requested' (asked to get the letters themselves). NEVER guess 'how': if the person did not say it, ASK «Як людина погодилась на листи: усно, письмово чи сама попросила?» — without consent nobody is added (a letter without consent is spam). Pass the client card: organization_id (a client organization, e.g. from erp_client_save / erp_client_find) or erp_contact_id (an ERP contact); with only a name/e-mail the card is found by the e-mail. Unsubscribed, bounced or complained addresses are refused and never added back. If the cabinet has double opt-in on (result 'confirmation_sent'), the person is NOT added yet — they got a «Підтвердіть підписку» letter and join after clicking it; say «надіслали лист для підтвердження», never «додано». Use it right after an e-mail was added to a client (erp_client_save, erp_create_contact) when the person says «так, додай у розсилку», or for «додай X у розсилку». Proposed write: one confirmation card. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.

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": {
      "email": "<email>",
      "how": "<how>"
    },
    "name": "email_marketing_add_contact"
  }
}

Input Schema

NameRequiredDescriptionDefault
howYes
noteNoWhere/how, e.g. «на касі, Оболонь».
emailYes
clientNoThe client's name as said (shown on the card).
consent_dateNoYYYY-MM-DD when they agreed; default today.
erp_contact_idNo
organization_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the consent policy, that unsubscribed/bounced/complained addresses are refused and never re-added, and that with double opt-in the result is 'confirmation_sent' meaning the person is NOT yet added (with the exact wording to use instead of «додано»). It also explains the proposed-write confirmation gate (status='confirmation_required' with action_id/plan_token, write only after confirm_action), which is consistent with readOnlyHint=false and destructiveHint=true.

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?

Front-loaded with the action and consent requirement, and every block (enum meanings, refusal cases, opt-in caveat, confirmation flow) carries decision-relevant information. It is dense and somewhat long, with the embedded Ukrainian prompt template and button reference adding bulk, but little is genuinely redundant.

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?

For a write tool with no output schema and only 43% parameter coverage, the description supplies everything an agent needs: required inputs, identifier alternatives, consent semantics, refusal behavior, the double opt-in return state, and the two-step confirmation protocol. Nothing material appears to be missing for correct invocation.

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?

With only 43% schema description coverage, the description compensates well for the critical fields: it spells out the three 'how' enum values in plain language (verbal/written/requested) and explains the organization_id vs erp_contact_id alternative plus the name/e-mail fallback for finding the card. It says nothing about `note` or `consent_date`, leaving two of seven parameters undocumented in prose beyond the schema hints.

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+resource (add a client to the e-mail marketing base/newsletter audience) with the consent qualifier, and anchors it to a concrete UI equivalent («Додати в розсилку» button on a client card). An agent can distinguish it from email_marketing_contacts (a listing tool) and from erp_client_save/erp_create_contact, which it explicitly names as upstream steps.

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?

Gives explicit positive triggers («right after an e-mail was added to a client … when the person says «так, додай у розсилку», or for «додай X у розсилку»») and an explicit prohibition with remedy («NEVER guess 'how' … if the person did not say it, ASK»). It also names the prerequisite tools that supply organization_id/erp_contact_id, so the agent knows how to get here.

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