Skip to main content
Glama
PyMC Marketing MCP

PyMC Marketing MCP

by funnelscript

Get Churn Risk Cohorts

get_churn_risk_cohorts
Read-onlyIdempotent

Identify customers at churn risk from a fitted CLV model by returning those whose Bayesian P(alive) falls below a chosen threshold, enabling targeted retention cohorts.

Instructions

Identify customers at churn risk from a fitted CLV model. Returns customers whose Bayesian P(alive) is below the specified threshold. Lower threshold = higher confidence of churn. Default threshold: 0.3.

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": {
      "model_id": "<model_id>"
    },
    "name": "get_churn_risk_cohorts"
  }
}

Input Schema

NameRequiredDescriptionDefault
model_idYes
threshold_p_aliveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observedv0.4.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare this a read-only, idempotent, closed-world operation, so the safety profile is covered. The description adds genuine behavioral meaning about the threshold direction ('lower threshold = higher confidence of churn'), but says nothing about result size, ordering, or cost for a cohort that could be large.

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?

Four short sentences, front-loaded with the core action and followed by return semantics and threshold interpretation. The final sentence restates the schema default of 0.3, which is mild redundancy but defensible as reinforcement of the threshold semantics.

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

Completeness3/5

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

There is no output schema, so the description is the only source of return-value information; it says who is returned (customers below the threshold) but not what fields each customer record contains or whether results are bounded. For a simple two-parameter read tool this is adequate but not complete.

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 0%, so the description carries the burden and largely does: it explains threshold_p_alive as a Bayesian P(alive) cutoff, states the direction of the trade-off, and confirms the 0.3 default. model_id is only implied to be the fitted CLV model identifier, but that inference is reasonably direct.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource ('Identify customers at churn risk') and scopes it to a fitted CLV model, which separates it from fitting tools like fit_clv_model. It does not explicitly contrast with siblings such as estimate_customer_lifetime_value, so differentiation is only implicit.

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

Usage Guidelines3/5

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

The phrase 'from a fitted CLV model' implies the prerequisite that a CLV model must exist and that model_id comes from fitting one, which is useful context. However, there is no explicit when-to-use versus when-not guidance, no mention of what to do if no model exists, and no named alternative.

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