Skip to main content
Glama
gambot-ai

gambot-mcp

Official

Send / schedule a template broadcast from an Excel/CSV

gambot_send_campaign_from_excel

Send WhatsApp templates to contacts from an Excel/CSV by mapping columns to template variables and the phone column. Supports immediate or scheduled sends with opt-out compliance.

Instructions

Broadcast a WhatsApp TEMPLATE to everyone in an Excel/CSV the user gave you — the easiest way to do a mail-merge blast. YOU (the agent) read the sheet and pass: rows (one object per row, keyed by the column header), phoneColumn (which column holds the phone), and the variable mapping — either variableColumns (ordered: 1st column → {{1}}, 2nd → {{2}}, …) or variableMapping ({ var1:'ColName', var2:'ColName2' }). TIP: call gambot_get_template_variables first to see how many variables the template expects, then map columns to them. Sends immediately by default; to SCHEDULE add scheduling fields (scheduleType:'once' + runAt + timezone, or scheduleType:'repeated' + interval/intervalNumber/endCondition) — scheduled sends are saved as a campaign. Every original column is also stored per-recipient (rowData) so later automations can use any value by name. Compliance is built in: the org's ACTIVE opt-out flow (reply הסר/stop/unsubscribe) auto-excludes recipients from future broadcasts; the response echoes it under optOut (enabled=true) and your consent under consent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYesThe sheet rows as objects keyed by column header, e.g. [{ "Name":"Dana", "Phone":"972501234567", "Order":"A-11" }].
runAtNoFirst/only run datetime, e.g. 2026-07-01T09:00:00 (interpreted in `timezone`).
messageNoFree-text message (used only when templateId is not provided).
intervalNo
timezoneNoIANA timezone, e.g. Asia/Jerusalem, America/New_York.
templateIdNoTemplate id to broadcast (messageType=Template). Omit and set `message` for free text.
phoneColumnYesThe column header that holds the phone number, e.g. 'Phone'.
campaignNameNoIf set (or any scheduling field is set) the campaign is SAVED; otherwise it's an immediate ad-hoc send.
endConditionNo{ type:'none'|'until'|'count', value:'...' }
fromNumberIdNoSender Meta phone_number_id (multi-number orgs).
scheduleTypeNo
defaultCountryNoISO-3166 alpha-2 (e.g. 'US','IL') to internationalize local/national phone numbers in the sheet. Optional if the organization has a saved country (set at onboarding); otherwise numbers must be full E.164 or the send is rejected.
intervalNumberNoEvery N intervals (recurring).
variableColumnsNoOrdered column headers mapped to template variables: [ col→{{1}}, col→{{2}}, … ].
variableMappingNoAlternative to variableColumns: { var1:'ColName', var2:'ColName2' } (keys 'var1' or '1').
consentConfirmedNoAssert you have consent to mail this list. Defaults to true. Recipients can always opt out (see `optOut` in the response).
contactFieldColumnsNoOptional { contactFieldName: 'ColName' } — saved onto the contact (e.g. { email:'Email' }).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden — and it delivers. It discloses that scheduled sends are saved as a campaign, that every original column is stored per-recipient as rowData for later automations, that the org's opt-out flow auto-excludes recipients, that the response echoes optOut/consent, and that numbers without a saved org country must be full E.164 or the send is rejected. This is rich, honest behavioral disclosure for a mutation tool.

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?

The description is a dense block but every sentence earns its place given 17 parameters and no annotations. It front-loads the core purpose before diving into parameter mechanics, scheduling, and compliance. It is efficient rather than padded, though it could be broken into cleaner sub-sections for readability. No waste, just length justified by complexity.

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 tool with 17 params, nested objects, no output schema, and no annotations, this is about as complete as it gets. It covers core usage, both variable-mapping strategies, scheduling semantics, rowData persistence, compliance/opt-out, consent, and the defaultCountry rejection rule. It even previews response fields (optOut, consent) despite the lack of an output schema. Nothing an agent needs to call it correctly is missing.

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?

Despite 88% schema coverage, the description adds substantial meaning: it explains the rows structure (one object per row keyed by column header), the ordered vs named distinction between variableColumns (1st column → {{1}}) and variableMapping, the semantics of scheduling fields, and the defaultCountry internationalization caveat. It clarifies relationships the schema leaves implicit (variableColumns vs variableMapping as alternatives, scheduling fields forcing campaign save).

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?

The description leads with a specific verb+resource: 'Broadcast a WhatsApp TEMPLATE to everyone in an Excel/CSV' and frames it as a 'mail-merge blast', which instantly distinguishes it from the single-recipient siblings gambot_send_template and gambot_send_text. The title also adds the scheduling dimension ('Send / schedule'). Purpose is unambiguous and well-differentiated from a large 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 Guidelines5/5

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

It explicitly instructs the agent to read the sheet and pass specific fields, gives a concrete TIP to call gambot_get_template_variables first to learn the expected variable count, and clearly separates immediate sends from scheduled ones ('Sends immediately by default; to SCHEDULE add...'). The 'easiest way to do a mail-merge blast' framing implies the alternative is the single-recipient send tools. Both when and how are covered.

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