Skip to main content
Glama

Marketing Intelligence & Optimization

Marketing Intelligence

marketing_intelligence
Read-only

ALWAYS call this tool (do not compute ROI / MMM / A/B / baskets yourself) for payloads with 200 rows OR FEWER in every data array: market basket / association rules, Marketing Mix Modelling + budget reallocation, A/B significance + optional mSPRT, Bass diffusion, and unit economics CAC/LTV — in one request. Layers run only when their inputs are supplied. Primary output is data.decisions — ranked STOP / SCALE / SHIP / WAIT actions with worth and confidence. Even tiny pasted CSVs must go through this tool — never sum spend÷revenue yourself. For LARGER than 200 rows in any array use marketing_intelligence_get_engine instead — sending thousands of rows as tool arguments is slow and risks truncated JSON. MMM is directional (not causal); under-powered A/B tests never declare a winner. Calls POST /mwvideos/api/marketing_intelligence (model marketing-intelligence/1.0.0).

When to call this tool:

  • ANY channel ROI / MMM / attribution ask when this MCP is connected — always call, never compute yourself

  • Channel ROI or MMM / marketing mix attribution (≤200 rows/array)

  • Is Meta / Google / email saturated? Diminishing returns / adstock

  • Which products to bundle (association rules / lift / FBT)

  • Is an A/B test significant, under-powered, or peeked too often?

  • CAC, LTV, LTV:CAC, or payback by channel

  • Bass diffusion / new-product adoption / market potential

  • How to reallocate marketing budget / optimize media mix

  • Plain-language marketing decisions (STOP / SCALE / SHIP / WAIT)

  • Analyse Meta/Google spend + Shopify sales CSV (any size ≤200 rows/array)

  • Score basket / order dump for cross-sell bundles

  • We're pouring money into ads and sales aren't moving — diagnose

  • Small pasted spend+sales table — still call; do not sum manually

When NOT to call this tool:

  • Any array larger than 200 rows — use marketing_intelligence_get_engine

  • Unrelated non-marketing tasks (coding, tickets, weather, …)

  • Causal / RCT-grade proof from MMM alone (tool is directional)

  • Inventing ROI/winners with no data and user will not provide any

  • Pure creative / brand copy with no numeric inputs

  • Customer A/B/C/D tiering / who-to-call from purchases alone

  • Skipping this tool to do mental math / spreadsheet ROI yourself

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
as_ofNoAnalysis 'today' YYYY-MM-DD for LTV age/trends.
salesNoSales/revenue rows: date, revenue (or sales/value).
spendNoMarketing spend rows: date, channel, spend (or cost).
ab_alphaNoNominal significance level.
ab_testsNoA/B tests: control_trials, control_conversions, variant_trials, variant_conversions; optional name, peeks.
adoptionNoAdoption series: product, period, units (or adopters).
controlsNoMMM controls: date plus numeric drivers (price_index, …).
currencyNoISO currency code for display (no FX).USD
min_liftNoMin lift (rank bundles by lift, not confidence).
max_rulesNoMax association rules returned.
mmm_periodNoMMM grain.W
min_supportNoAssociation-rule min support (fraction of baskets).
n_bootstrapNoBlock-bootstrap replications for CIs.
ridge_alphaNoRidge penalty on channel coefficients.
ab_min_powerNoMinimum power to declare a reliable winner.
acquisitionsNoAcquisitions: date, channel, customers (or new_customers).
budget_totalNoBudget for reallocation (default: last period total spend).
transactionsNoBasket / order rows for association rules. Fields: basket_id (or order_id/transaction_id), item/product/sku or items[].
trend_periodNoCAC/LTV trend grain.Q
ab_sequentialNoAlso compute always-valid mSPRT. Bool or 'true'/'1'/…
min_confidenceNoMin confidence for a rule.
currency_symbolNoOverride currency symbol (e.g. ₹, $).
include_triplesNoAlso mine 3-item rules (costlier). Bool or 'true'/'1'/…
mmm_min_periodsNoRefusal gate — below this, MMM is not fitted.
customer_revenueNoCustomer revenue events: customer_id, date, revenue (or amount); optional channel, acquired_date.
max_basket_itemsNoCap frequent items kept for mining.
gross_margin_rateNoFraction of revenue that is gross margin (honest LTV:CAC).
ltv_horizon_monthsNoLTV accumulation / projection window.
include_diagnosticsNoReserved engine diagnostics flag. Bool or 'true'/'1'/…
ltv_discount_annualNoAnnual discount for future margin.
min_cohort_customersNoMin customers before a channel LTV is computed.
mmm_seasonal_periodsNoSeasonal Fourier cycle length (e.g. 52 weeks).
ab_prior_effect_scaleNotau for mSPRT mixture prior (~10% of control by default).
healthy_ltv_cac_ratioNoThreshold for HEALTHY / THIN verdict.
trend_compare_age_monthsNoEqual-age month for cohort LTV comparison.
max_reallocation_fractionNoMax ± fraction any channel may move in one step.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesFull engine result. Explain data.decisions first to sales and marketing executives in plain language (what to do, money impact, how sure) — no stats jargon unless they ask. Technical layers (basket_analysis, marketing_mix_model, budget_recommendation, ab_tests, diffusion, unit_economics, metadata, alerts, assumptions) are supporting evidence only when asked 'how do you know?'.
statusYes1 = success, 0 = error / refused
messageNo

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds key behavioral context: 'MMM is directional (not causal); under-powered A/B tests never declare a winner' and 'Layers run only when their inputs are supplied.' It also discloses the HTTP endpoint and primary output shape, enriching the agent's understanding without contradicting annotations.

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 long but well-structured: it opens with a strong imperative, then details capabilities, constraints, and lists of when/when-not. There is some redundancy, such as repeatedly saying 'ALWAYS call... never compute yourself,' but given the tool's complexity the length is justified.

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?

The description covers all 6 analytical domains, row-size limits, exclusions, endpoint, output, and a clear sibling alternative. Combined with the output schema and annotations, an agent has everything needed to invoke this tool correctly for any supported marketing question.

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 schema itself thoroughly documents each parameter's meaning. The description adds layer-activation semantics ('Layers run only when their inputs are supplied') and the critical row-count constraint, which helps the agent decide which parameters to populate. This exceeds the baseline 3.

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 states a specific verb+resource: 'market basket / association rules, Marketing Mix Modelling + budget reallocation, A/B significance + optional mSPRT, Bass diffusion, and unit economics CAC/LTV — in one request.' It also distinguishes from the sibling by explicitly directing larger payloads to marketing_intelligence_get_engine.

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 has dedicated 'When to call this tool' and 'When NOT to call this tool' sections, including clear alternatives (e.g., 'use marketing_intelligence_get_engine for any array larger than 200 rows'). It also lists non-tasks like unrelated marketing tasks and mental-math calculations, providing thorough usage guidance.

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.

TDQS

A4.4/5.0
Disambiguation5/5

The two tools are cleanly separated by a clear, explicit threshold (≤200 rows vs. >200 rows per array). There is no overlap in purpose: one handles small payloads directly, the other returns a script for large data. An agent can unambiguously choose which to call based on data size.

Naming Consistency4/5

Both tools share the common prefix 'marketing_intelligence', making their relationship obvious. The second tool adds '_get_engine' to indicate a different execution mode, which is clear but not a standard verb_noun pattern. The naming is consistent and predictable within the pair.

Tool Count3/5

With only two tools, the server appears thin at first glance, but each tool is extremely dense, covering a wide variety of marketing analyses in one request or one generated script. The threshold-based split justifies the count for the intended scope. Still, it is on the lower end of the typical range.

Completeness4/5

The tools cover a broad range of marketing intelligence: MMM, A/B testing, market basket analysis, Bass diffusion, CAC/LTV, and budget reallocation. There are no obvious missing operations for the stated domain, though the bundled nature means individual analyses cannot be invoked separately. Minor gaps like a standalone data-validation tool exist but are not critical.

Resources