Skip to main content
Glama
imMamdouhaboammar

PyMC Marketing MCP

fit_purchase_model

Fit Bayesian purchase frequency models to RFM data using BG/NBD or Shifted Beta-Geometric, with automatic column normalization.

Instructions

Fit a Bayesian purchase/transaction frequency model (BG/NBD or Shifted Beta-Geometric). Normalizes user column names to canonical RFM attributes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses a notable behavior: normalization of column names, which is helpful. However, it does not mention that fitting runs MCMC (evident from sampler schema), potential runtime expectations, or that it likely requires a registered dataset (implied by dataset_id). Given the Bayesian natureamented, it is a moderate disclosure.

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 concise: two sentences, with the core purpose in the first and the normalization side-effect in the second. It is front-loaded and avoids redundancy, though mentioning the model types could be omitted since they are in the schema enum, but it helps clarify purpose.

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?

For a complex Bayesian model fitting tool with an extensive sampler config, the description is sparse. It does not explain what the output will be (though no output schema exists, so this is a gap), nor does it clarify the data requirements beyond 'RFM data'. It relies heavily on the schema for parameter specifics, but lacks guidance on prerequisites or expected behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning all parameter descriptions come from the schema itself. The description adds no additional meaning beyond what the schema already states, but the schema is quite self-explanatory with detailed descriptions for each parameter. Since coverage is high in terms of schema self-documentation, a baseline 3 is appropriate; the description doesn't need to compensate.

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 clearly states the action ('Fit a Bayesian purchase/transaction frequency model'), specifies the resource (BG/NBD or Shifted Beta-Geometric), and mentions a key side effect: normalizing user column names to canonical RFM attributes. This clearly distinguishes it from sibling tools that fit value models or predict other metrics.

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 description implies usage for fitting frequency models but does not explicitly state when to use this vs. alternatives like `fit_value_model` or `fit_clv_model`. It mentions two model types, suggesting when each might be appropriate (continuous vs. contractual), but there is no explicit guidance on when to select this tool over siblings.

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